At 11:04 AM 5/3/2001 -0800, John C. Landers wrote:
>Doing sql like this with dates causes an exception:
>
>SELECT * FROM SOME_TABLE WHERE ? IN (DATE_0,DATE_1)
I'm pretty sure this isn't valid SQL, regardless of the RDBMS implementation.
You can use a data parameter in place of a constant expression.
The "IN" predicate expects its left operand to be a row value expression
(more commonly, a column reference).
You could use this query instead:
SELECT * FROM SOME_TABLE WHERE DATE_0 = ? OR DATE_1 = ?
And pass the same data value as a parameter twice when you execute the query.
Bill Karwin (bill@lutris.com)
Application Architect - Lutris Technologies Inc.
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|