Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case Statement using Microsoft Access ODBC Driver

Status
Not open for further replies.

tonyweis

Programmer
Jan 19, 2007
1
US

I am trying to use a case like the following in a query to a microsoft Access database but it tells me i have a missing operator in the case expression. I have tried to rework the case statement a million ways and it still gives me the same error.

select nm = case when c.deliveryname = '' then c.name else c.deliveryname end

Any ideas?
 




Hi,

If you're using the Access ODBC Driver, the CASE statement is not part of the SQL language. You'd have to use the IIF() function.

BTW, I've never seen ...
Code:
Select [b]n =[/b] m
Using the CASE statement...
Code:
select case when c.deliveryname = '' then c.name else c.deliveryname end
or am I missing something???



Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top