Multiple condition query?????

pdbowling

Registered User.
Local time
Today, 07:50
Joined
Feb 14, 2003
Messages
179
Hi all,
I've got an update query that looks like this so far

UPDATE Ark SET Ark.DeptCode = 'IA702'
WHERE (((Ark.DeptCode)='Assy1'));

The question: I have 30 different DeptCodes to update. Can this be combined into one giant update query or do I need to write 30 different ones? Each different DeptCode gets a new one.
Thanks all
PB
 
Build a table with OldCode and NewCode fields. Include this in your update query and join it to your main table via DeptCode.
Then replace:

'IA702' with NewCode field and
'Assy1' with OldCode field

Should pull through the corresponding field value.
 
Wha??? I don't get it.

Well, I tried but this didn't work

SELECT *
FROM Ark
LEFT JOIN DepartmentTransitionTable
ON Ark.DeptName = DepartmentTransitionTable.OldCode;


It keeps asking me for Ark.DeptName and the whole column turns out to be one value. Any clues for me????
PB
 
Hrmph

It worked and I didn't change anything.
Thanks a million
PB
 

Users who are viewing this thread

Back
Top Bottom