syntax error -- Case statement in Query

dai_lo

Registered User.
Local time
Today, 15:12
Joined
Jan 10, 2008
Messages
30
Hi,

I received syntax error for the following statement

SELECT
CASE [File Type]
WHEN 'Security' THEN 'SEC'
WHEN 'Admin' THEN 'ADM'
END AS FT
FROM [tbl_Core Non-Core]


please advise

thanks

Alice
 
If you are in Access, then the CASE statement is not valid. You can use the IIf() function in it's place.
 
You could also try the Switch function.
 
SWITCH Function does the work.

many thanks
 

Users who are viewing this thread

Back
Top Bottom