InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Date Types and In Clause fail.


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.