Hi any ideas on how I can clean up my items database? we have lots of inactive items in our database that I would like to delete or make them inactive. Thanks
- posted
16 years ago
Hi any ideas on how I can clean up my items database? we have lots of inactive items in our database that I would like to delete or make them inactive. Thanks
hi Jose, if you talk about delete be carefull for those items which has some transaction history so the inactive is good option for you.
Go to SO Administrator program and then Connect to your database then go to Query and type the following
-- check first no transaction exists select * from inventorytransferlog where itemid in (select id from item where inactive=1) select * from inventoryoffline where itemid in (select id from item where inactive=1) select * from transactionentry where itemid in (select id from item where inactive=1) select * from orderentry where itemid in (select id from item where inactive=1) select * from purchaseorderentry where itemid in (select id from item where inactive=1)
you can put more clause like "and itemlookupcode='xxxxx'" this enable to check first there is nothing in any transaction data. once this shows zero in query records then you can delete the records delete from alias where itemid in (select id from item where inactive=1) delete from itemclasscomponent where itemid in (select id from item where inactive=1) delete from item where inactive=1
One more important thing is that you can create store procedure to accomplish this tasks if Iwill have time i will do this for you. but don't forget to rate this one.
"Jose" wrote:
Hi, thanks for your help, but I am very new at this. could you explain a little bit more? Thanks. jose
hi Jose, The login behind this is that before you delete any records from your databse system make sure that there should not any transaction exists, because if you delete an item which has already transit data it will create future problems like incosistency in your reports and then you will loss valued information. I always have procedure to do so check first transaction if exists not delete the master information.
Same log> Hi, thanks for your help, but I am very new at this. could you explain a
Jose,
Download our RMS Toolkit 30 Day Trial at:
Greg Digital Retail Solutions
Thanks Akber. you are a life saver. if you want you can e-mail direct me at snipped-for-privacy@reynoldcycle.com thanks again Jose
Jose,
Download our RMS Toolkit 30 Day Trial at:
Greg Digital Retail Solutions
BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.