Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare @ic as table (custid int) insert into @ic select cus_custid from cusmer
- where cus_Custid not in (select pnv_custid from pinvoice) and cus_Custid not in (select ord_custid from orders) and cus_Custid not in (select art_custid from ar_trn)
- delete shipto where shi_custid in (select * from @ic)
- delete cusdet where cdt_custid in (select * from @ic)
- delete cussitestats where cst_custid in (select * from @ic)
- delete cusstats where css_custid in (select * from @ic)
- delete cusmer where cus_custid in (select * from @ic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement