looking for the Access equivalent of the CASE WHEN SQL Server operator in query

O

Oscar

I am trying to convert some SQL Server queries to have them working with a
MS Access database and use ADO.

I am not able to find an Access equivalent for the SQL Server Construct :

ColumnName = CASE WHEN EXIST (.....) THEN 1 ELSE 0 END

The compiler fires an error : 'syntax error query expression for such
queries.'

Is there an Access equivalent for these kind of queries?
 
R

Rick Brandt

Oscar said:
I am trying to convert some SQL Server queries to have them working
with a MS Access database and use ADO.

I am not able to find an Access equivalent for the SQL Server
Construct :
ColumnName = CASE WHEN EXIST (.....) THEN 1 ELSE 0 END

The compiler fires an error : 'syntax error query expression for such
queries.'

Is there an Access equivalent for these kind of queries?

Check help file for IIf() Switch() and Choose(). You can also create user
defined functions to solve many such problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top