delete open inventory transfer

Jun 01, 2007 8 Replies

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


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:

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

transfer in HQ,

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required