Subject RE: [firebird-support] Problem with query parameter
Author Svein Erling Tysvær
A workaround would be

select * from TABLE
where FIELD = coalesce(:param, FIELD)

This will never use any index, but there's no way to use indexes with WHERE clauses like this anyway.

HTH,
Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Harriv
Sent: 10. mars 2009 15:46
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Problem with query parameter

I'm trying to do something like this:

select * from TABLE
where FIELD = :param or :param is null

When executing that, I get "Dynamic SQL Error SQL error code = -804 Data
type unknown" error. Should the above statement even be a possible?


[Non-text portions of this message have been removed]