Deleting all the parts in the database

First, thanks for the chuckle Michael. Of course, you realize that by
deleting rows off those other tables, that would mean there will be other
tables you need to delete from. Rather than publish the second level of
purges you need to go to, just see the list by running "Data Dictionary".



I agree with Mark on the first choice. I'd recommend, if you don't already
have it, getting DMT. It's a relatively inexpensive product, but you can
get that delete running in a matter of minutes. And, if there's part
transactions that exist - it rightfully won't delete the part.



Kevin Simon



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Mark Wonsil
Sent: Thursday, July 05, 2012 11:59 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Deleting all the parts in the database





Michael wrote:

> The following is a list of tables where it is possible for a part record
to exist. If you wish to insure that your purge is comprehensive you will
need to delete the appropriate records from each of the following tables:
> :
...
>
> Good Luck with your purge.
>

Michael and others are correct. SQL is not the way I would go. My
first choice is to just restore the database to a state before you did
the mass load. My second choice, if you really need to delete parts
and save other work, is to write a .Net program to use the business
objects to delete each part to ensure database integrity. It would be
a fairly easy program to write.

Mark W.





[Non-text portions of this message have been removed]
Dear Friends;

Could anybody please let me know the SQL command to delete all the parts from the database. The database is raw and the parts which are available in the database doesn't have any connection with any PO; Sales Order; Bill of Material etc.Â

I know the command is DELETE * from PART but my doubt is that only on the Part table I have to run this command or there are other tables also on which I need to run this command.

Thanks in advance for your support

Regards

Sreejith J

[Non-text portions of this message have been removed]
The part schema in the groups files might help you:
http://tech.groups.yahoo.com/group/vantage/files/Schemas/

--- In vantage@yahoogroups.com, Sreejith Jaganathan <sreesvantagedoubts@...> wrote:
>
> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts from the database. The database is raw and the parts which are available in the database doesn't have any connection with any PO; Sales Order; Bill of Material etc.Â
>
> I know the command is DELETE * from PART but my doubt is that only on the Part table I have to run this command or there are other tables also on which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>
Also, the fastest way to delete all records in any given table is TRUNCATE.




TRUNCATE TABLE Part

TRUNCATE TABLE PartBin



It's faster than DELETE and has less locking and uses less log space.



http://msdn.microsoft.com/en-us/library/ms177570.aspx







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
b_ordway
Sent: Wednesday, July 04, 2012 1:00 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Deleting all the parts in the database





The part schema in the groups files might help you:
http://tech.groups.yahoo.com/group/vantage/files/Schemas/

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , Sreejith
Jaganathan <sreesvantagedoubts@...> wrote:
>
> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts
from the database. The database is raw and the parts which are available in
the database doesn't have any connection with any PO; Sales Order; Bill of
Material etc.
>
> I know the command is DELETE * from PART but my doubt is that only on the
Part table I have to run this command or there are other tables also on
which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

[Non-text portions of this message have been removed]
I raised the same query with Epicor Support and they answered me as below

Removing or adding data directly to the SQL database is
not supported and we strongly advise against it.
Â
In case if you need huge amount of changes for the
database, professional services can write you a script that does the changes
required by you.
This is not an SQL script, but a progress program that
delete all references for the part.
This is a chargeable service and can be requested from
your local office.


________________________________
From: Vic Drecchio <vic.drecchio@...>
To: vantage@yahoogroups.com
Sent: Thursday, July 5, 2012 4:51 PM
Subject: RE: [Vantage] Re: Deleting all the parts in the database


Â
Also, the fastest way to delete all records in any given table is TRUNCATE.

TRUNCATE TABLE Part

TRUNCATE TABLE PartBin

It's faster than DELETE and has less locking and uses less log space.

http://msdn.microsoft.com/en-us/library/ms177570.aspx

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
b_ordway
Sent: Wednesday, July 04, 2012 1:00 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Deleting all the parts in the database

The part schema in the groups files might help you:
http://tech.groups.yahoo.com/group/vantage/files/Schemas/

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> , Sreejith
Jaganathan <sreesvantagedoubts@...> wrote:
>
> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts
from the database. The database is raw and the parts which are available in
the database doesn't have any connection with any PO; Sales Order; Bill of
Material etc.
>
> I know the command is DELETE * from PART but my doubt is that only on the
Part table I have to run this command or there are other tables also on
which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
And if you were going to go this route, I would just by DMT.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Sreejith Jaganathan
Sent: Thursday, July 05, 2012 9:26 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Deleting all the parts in the database





I raised the same query with Epicor Support and they answered me as below

Removing or adding data directly to the SQL database is
not supported and we strongly advise against it.

In case if you need huge amount of changes for the
database, professional services can write you a script that does the changes
required by you.
This is not an SQL script, but a progress program that
delete all references for the part.
This is a chargeable service and can be requested from
your local office.












Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring


This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.



________________________________

From: Vic Drecchio <vic.drecchio@... <mailto:vic.drecchio%40swepcotube.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Thursday, July 5, 2012 4:51 PM
Subject: RE: [Vantage] Re: Deleting all the parts in the database



Also, the fastest way to delete all records in any given table is TRUNCATE.

TRUNCATE TABLE Part

TRUNCATE TABLE PartBin

It's faster than DELETE and has less locking and uses less log space.

http://msdn.microsoft.com/en-us/library/ms177570.aspx

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of
b_ordway
Sent: Wednesday, July 04, 2012 1:00 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Deleting all the parts in the database

The part schema in the groups files might help you:
http://tech.groups.yahoo.com/group/vantage/files/Schemas/

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , Sreejith
Jaganathan <sreesvantagedoubts@...> wrote:
>
> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts
from the database. The database is raw and the parts which are available in
the database doesn't have any connection with any PO; Sales Order; Bill of
Material etc.
>
> I know the command is DELETE * from PART but my doubt is that only on the
Part table I have to run this command or there are other tables also on
which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
Well of course they said that. And they should. Exercise extreme caution with doing anything inside SS Mgmt Studio.



I've done a lot of direct imports and modifications and other crazy things inside SQL. But then again, I've been working with the Vantage back-end db schema since 1999 and I know what and what not to do. And I've made many mistakes along the way; thankfully all in a test environment. :-)







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Sreejith Jaganathan
Sent: Thursday, July 05, 2012 9:26 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Deleting all the parts in the database





I raised the same query with Epicor Support and they answered me as below

Removing or adding data directly to the SQL database is
not supported and we strongly advise against it.

In case if you need huge amount of changes for the
database, professional services can write you a script that does the changes
required by you.
This is not an SQL script, but a progress program that
delete all references for the part.
This is a chargeable service and can be requested from
your local office.

________________________________
From: Vic Drecchio <vic.drecchio@... <mailto:vic.drecchio%40swepcotube.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Thursday, July 5, 2012 4:51 PM
Subject: RE: [Vantage] Re: Deleting all the parts in the database



Also, the fastest way to delete all records in any given table is TRUNCATE.

TRUNCATE TABLE Part

TRUNCATE TABLE PartBin

It's faster than DELETE and has less locking and uses less log space.

http://msdn.microsoft.com/en-us/library/ms177570.aspx

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of
b_ordway
Sent: Wednesday, July 04, 2012 1:00 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Deleting all the parts in the database

The part schema in the groups files might help you:
http://tech.groups.yahoo.com/group/vantage/files/Schemas/

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> , Sreejith
Jaganathan <sreesvantagedoubts@...> wrote:
>
> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts
from the database. The database is raw and the parts which are available in
the database doesn't have any connection with any PO; Sales Order; Bill of
Material etc.
>
> I know the command is DELETE * from PART but my doubt is that only on the
Part table I have to run this command or there are other tables also on
which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12




-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2193 / Virus Database: 2437/5112 - Release Date: 07/05/12


[Non-text portions of this message have been removed]
The following is a list of tables where it is possible for a part record to exist. If you wish to insure that your purge is comprehensive you will need to delete the appropriate records from each of the following tables:
:
AprvVend
APInvDtl
BackLog
BOMRpt
CCQuickListDtl
CostPart
CountExp
CountPrt
CountTag
CustWebPart
CustXPrt
DemandContractDtl
DemandDetail
DemandQtyRef
DemandReconcile
DMRHead
ECOCOPart
ECOMtl
ECOOpDtl
ECOOpr
ECORev
EDIDemandDtl
EDIDemandLine
FinCharge
Forecast
FSCallDt
FSCallMt
FSContDt
FSContSN
GlbForecast
GlbPart
GlbPartLang
GlbVendPart
GlbVendPBrk
HDCase
IMAPInvDtl
IMAprvVend
IMBackLog
IMBOMRpt
IMCCQuickListDtl
IMCostPart
IMCountExp
IMCountPrt
IMCountTag
IMCustWebPart
IMCustXPrt
IMDemandContractDtl
IMDemandDetail
IMDemandQtyRef
IMDemandReconcile
IMDMRHead
IMECOCOPart
IMECOMtl
IMECOOpDtl
IMECOOpr
IMECORev
IMEDIDemandDtl
IMEDIDemandLine
IMFinCharge
IMForecast
IMFSCallDt
IMFSCallMt
IMFSContDt
IMFSContSN
IMGlbForecast
IMGlbPart
IMGlbPartLang
IMGlbVendPart
IMGlbVendPBrk
IMHDCase
IMInvcDtl
IMJMtlStat
IMJobAsmbl
IMJobClosingLog
IMJobHead
IMJobMtl
IMJobOper
IMJobPart
IMJobProd
IMLaborPart
IMMasProd
IMMscShpDt
IMMtlQueue
IMNonConf
IMOPrice
IMOrderDtl
IMOrderQtyRef
IMOrderRel
IMPart
IMPartAlloc
IMPartAudit
IMPartBin
IMPartBinInfo
IMPartCOPart
IMPartCost
IMPartDim
IMPartDtl
IMPartLangDesc
IMPartLot
IMPartMtl
IMPartOpDtl
IMPartOpr
IMPartPlant2
IMPartRev
IMPartSched
IMPartSchedVend
IMPartSubs
IMPartSug
IMPartTran
IMPartWhse
IMPartWip
IMPcAudit
IMPcDynLst
IMPcInPrice
IMPcInputs
IMPcInValue
IMPcPage
IMPcRules
IMPcStatus
IMPcStrComp
IMPcVerDynLst
IMPcVerInPrice
IMPcVerInputs
IMPcVerPage
IMPcVerRules
IMPcVerStatus
IMPcVerStrComp
IMPegDmdMst
IMPegLink2vfw
IMPegSupMst
IMPickedOrders
IMPlantTran
IMPlantWhse
IMPLPartBrk
IMPODetail
IMPOSchedule
IMPPlanHed
IMPPlanMtl
IMPPlanQty
IMPriceLstParts
IMPWLocHis
IMQuoteAsm
IMQuoteDtl
IMQuoteMtl
IMQuoteOpr
IMRcvDtl
IMRebateDtl
IMRebateTrans
IMReqDetail
IMRFQItem
IMRFQSugg
IMRMADtl
IMSerialNo
IMShipDtl
IMSNTran
IMSubShipD
IMSugPODtl
IMTaxSvcDetail
IMTFOrdDtl
IMTFOrdSug
IMTFShipDtl
IMTimePhas
IMVendPart
IMVendPBrk
IMWipRpt
InvcDtl
JMtlStat
JobAsmbl
JobClosingLog
JobHead
JobMtl
JobOper
JobPart
JobProd
LaborPart
MasProd
MscShpDt
MtlQueue
NonConf
Obsolete803-TaxSvcDtl
OPrice
OrderDtl
OrderQtyRef
OrderRel
Part
PartAlloc
PartAudit
PartBin
PartBinInfo
PartCOPart
PartCost
PartDim
PartDtl
PartLangDesc
PartLot
PartMtl
PartOpDtl
PartOpr
PartPlant
PartRev
PartSched
PartSchedVend
PartSubs
PartSug
PartTran
PartWhse
PartWip
PcAudit
PcDynLst
PcInPrice
PcInputs
PcInValue
PcPage
PcRules
PcStatus
PcStrComp
PcVerDynLst
PcVerInPrice
PcVerInputs
PcVerPage
PcVerRules
PcVerStatus
PcVerStrComp
PegDmdMst
PegLink
PegSupMst
PickedOrders
PlantTran
PlantWhse
PLPartBrk
PODetail
POSchedule
PPlanHed
PPlanMtl
PPlanQty
PriceLstParts
PWLocHis
QuoteAsm
QuoteDtl
QuoteMtl
QuoteOpr
RcvDtl
RebateDtl
RebateTrans
ReqDetail
RFQItem
RFQSugg
RMADtl
SerialNo
ShipDtl
SNTran
SubShipD
SugPoDtl
TaxSvcDetail
TFOrdDtl
TFOrdSug
TFShipDtl
TimePhas
VendPart
VendPBrk
WipRpt


Good Luck with your purge.


Michael

Michael Barry
Aspacia Systems Inc
866.566.9600SDWrae
312.803.0730 fax
http://www.aspacia.com/

On Jul 3, 2012, at 10:01 PM, Sreejith Jaganathan wrote:

> Dear Friends;
>
> Could anybody please let me know the SQL command to delete all the parts from the database. The database is raw and the parts which are available in the database doesn't have any connection with any PO; Sales Order; Bill of Material etc.
>
> I know the command is DELETE * from PART but my doubt is that only on the Part table I have to run this command or there are other tables also on which I need to run this command.
>
> Thanks in advance for your support
>
> Regards
>
> Sreejith J
>
> [Non-text portions of this message have been removed]
>
>



[Non-text portions of this message have been removed]
Michael wrote:

> The following is a list of tables where it is possible for a part record to exist. If you wish to insure that your purge is comprehensive you will need to delete the appropriate records from each of the following tables:
> :
...
>
> Good Luck with your purge.
>

Michael and others are correct. SQL is not the way I would go. My
first choice is to just restore the database to a state before you did
the mass load. My second choice, if you really need to delete parts
and save other work, is to write a .Net program to use the business
objects to delete each part to ensure database integrity. It would be
a fairly easy program to write.

Mark W.