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

  • Thread starter Thread starter Oscar
  • Start date Start date
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?
 
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.
 
Back
Top