WarcraftPlayer
MIS
I have an update query. That takes a group of documents and marks them as approved.
The problem I am having is there are previous documents that I want to change from approved(1) to not approved(0).
How do I write a query to take all the customers that came up in the above query and change all the other documents they have to not approved.
Thanks in advance.
Code:
UPDATE documents
SET Approved = 1,
Imported = 1,
ApprovalDate = getdate(),
ApprovedBy = 'JOE',
FROM documents d
INNER JOIN customers c
ON d.customerid = c.customerid
WHERE d.tempid ='AUTOPOST'
The problem I am having is there are previous documents that I want to change from approved(1) to not approved(0).
How do I write a query to take all the customers that came up in the above query and change all the other documents they have to not approved.
Thanks in advance.