delete open inventory transfer

What sql command would you use to delete only OPEN inventory transfer in HQ, but not effect closed or partial transfer? Thanks Dave

Reply to
DCR
Loading thread data ...

HI DCR, run the below query to accomplish your task.

delete from purchaseorderentrydetail where purchaseorderentryid in (select id from purchaseorderentry where purchaseorderid in (select id from purchaseorder where POType between

2 AND 5 and status=0))

delete from purchaseorderentry where purchaseorderid in (select id from purchaseorder where POType between

2 AND 5 and status=0)

delete from purchaseorder where POType between 2 AND 5 and status=0

I also appreicate if you rate this.

"DCR" wrote:

Reply to
Akber Alwani

Reply to
Akber Alwani

Reply to
Akber Alwani

hi, I am wriging the below script which will now check the partial transfer b/w the 2 dates: delete from purchaseorderentrydetail where purchaseorderentryid in (select id from purchaseorderentry where QuantityReceived0 and purchaseorderid in (select id from purchaseorder where POType between

2 AND 5 and status=0 and lastupdated between '2004-01-07' and '2007-06-05')) delete from purchaseorderentry where purchaseorderid in (select id from purchaseorder where POType between 2 AND 5 and status=0 and lastupdated between '2004-01-07' and '2007-06-05') and QuantityReceived0 -- Check if some of them already received called parital transfers

delete from purchaseorder where POType between 2 AND 5 and status=0 and lastupdated between '2004-01-07' and '2007-06-05'

The previous script just delete both partial and n> I haven't ran the script yet. I do have a couple of questions first. Will it

Reply to
Akber Alwani

Reply to
DCR

transfer in HQ,

Reply to
DCR

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.