Ms Acces combine two quries

datta511

New member
Local time
Today, 04:20
Joined
Jul 17, 2013
Messages
2
Hi Friends,

How can I create single query from 2 in MS Access 2007? (SQLView)

Query 1

UPDATE ETAM_PeopleSoft_Data
SET USER_TYPE= 'Inactive'
Where USER_TYPE= 'T'

Query 2

UPDATE ETAM_PeopleSoft_Data
SET USER_TYPE= 'Active'
Where USER_TYPE<> 'T'

I tried below but it didn`t worked...

UPDATE ETAM_PeopleSoft_Data SET USER_TYPE= Case WHEN USER_TYPE='T' THEN 'Inactive'
ELSE 'Active'
END AS USER_TYPE


Thank you,
Datta
 
Code:
UPDATE ETAM_People_Soft_Data
SET USER_TYPE = IIf([USER_TYPE]='T', "Inactive", "Active")

Be sure to backup ITEM_People_Soft_Data before trying any action query.
 
FYI I moved your thread to a more appropriate forum.
 

Users who are viewing this thread

Back
Top Bottom