D dai_lo Registered User. Local time Today, 15:12 Joined Jan 10, 2008 Messages 30 Jan 16, 2008 #1 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
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
pbaldy Wino Moderator Staff member Local time Today, 15:12 Joined Aug 30, 2003 Messages 36,157 Jan 16, 2008 #2 If you are in Access, then the CASE statement is not valid. You can use the IIf() function in it's place.
If you are in Access, then the CASE statement is not valid. You can use the IIf() function in it's place.
KeithG AWF VIP Local time Today, 15:12 Joined Mar 23, 2006 Messages 2,591 Jan 16, 2008 #3 You could also try the Switch function.
D dai_lo Registered User. Local time Today, 15:12 Joined Jan 10, 2008 Messages 30 Jan 17, 2008 #4 SWITCH Function does the work. many thanks