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.

I would accept this answer but if you use non dates (numbers or varchars )
with instantdb it works.

select * from some_table where 'abc' in ( VARCHARCOL1,VARCHARCOL2);

Also this query works fine in Oracle and MSSqlServer.
Our software uses this style of query and using the 'or' solution
would increase our bind variables '?' times 5 which is already at
around 10. So 50 bind variables would not perform as well.

So if this was fixed we could use instantdb.

Thanks, jcl.


-----------------------------------------------------------------------------
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.