I have seen several tread posted here about IIF(). I found none of them can solve my problem.
My access sql statements is like the following:
SELECT name FROM customer WHERE IIF(isdate(note),note,'01/01/2050')> #01/01/2001#
The column "note" is text (like varchar(255)), but it can be a date, a numeric value, a boolean value. It depends on the other column "note_type".
I know I can use CASE and WHEN statement if I select "note" column also. Unfortunately, "name" is the only column I can have (simply put,I am using ASP to generate sql and use it dynamically).
Can anyone tell me how to get around IIF() function in WHERE clause?
My access sql statements is like the following:
SELECT name FROM customer WHERE IIF(isdate(note),note,'01/01/2050')> #01/01/2001#
The column "note" is text (like varchar(255)), but it can be a date, a numeric value, a boolean value. It depends on the other column "note_type".
I know I can use CASE and WHEN statement if I select "note" column also. Unfortunately, "name" is the only column I can have (simply put,I am using ASP to generate sql and use it dynamically).
Can anyone tell me how to get around IIF() function in WHERE clause?