Make your own free website on Tripod.com

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 10:47 AM 5/4/2001 -0800, John C. Landers wrote:
>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);

Wait--you changed _two_ things between your examples:  the datatype, and 
your use of data parameter vs. literal constant as the left operand of the 
IN predicate.  No fair!  :-)

Can you use a data parameter in place of 'abc' in this example if you use 
non-dates?  The use of a parameter in that context was what I was 
commenting was illegal SQL, not the use of a constant as the l.h.s. of IN 
instead of a column reference.

The l.h.s. of IN is a row value constructor according the SQL3 spec.  A row 
value constructor can decompose to a simple string constant, and you can 
use a data parameter for that.  But a row value constructor can be other 
things besides a constant, and you can't use a data parameter for 
those.  Think of it this way:  if you can *ONLY* put a single constant 
expression in a given syntactic position, then you should be able to use a 
data parameter in that position.  Otherwise, no.


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.