Update query, combine?

kcyankees125

Registered User.
Local time
Today, 05:00
Joined
Nov 20, 2012
Messages
11
I have an update query that I would like to do. Is it possible for me to have both the update "D" part and update "I" part in one query, or do I have to separate them. (Currently Access tells me that it finds characters after the end of the SQL statement

Code:
UPDATE WorldAreaCodes2 SET WorldAreaCodes2.Type = "D"
WHERE ((([WorldAreaCodes2].[Rgn Cd])=0));

UPDATE WorldAreaCodes2 SET WorldAreaCodes2.Type = "I"
WHERE ((([WorldAreaCodes2].[Rgn Cd])<>0));
 
Try

UPDATE WorldAreaCodes2 SET WorldAreaCodes2.Type = IIf([WorldAreaCodes2].[Rgn Cd]=0, "D", "I")
 

Users who are viewing this thread

Back
Top Bottom