September 21, 2010 at 12:13 pm
I want to convert Access query iif to SQL statement but got errors:
IIf(#TUploadTo.WCFComplete=True,'WC','WI') AS Result
How to convert it?
September 21, 2010 at 12:19 pm
try the CASE statement (see BOL)
if you are still having problems please post back.
regards gah
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
September 21, 2010 at 12:30 pm
case #TUploadTo.WCFComplete
when 1 then 'WC'
else 'WI'
end as result
I got multi-part idendifier "#TUploadTo.WCFComplete" could not be bound error
September 24, 2010 at 10:08 pm
If you can provide the whole query I suspect that someone could help you solve this problem. (My guess is that you have given an alias to the #TUploadTo table, and if you do that you have to use the alias in the SELECT portion of you statement.)
September 29, 2010 at 7:07 am
CASE WHEN TUploadTo.WCFComplete = 1 THEN 'WC' ELSE 'WI' END AS result
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply