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]

InstantDB: select madness


Hello,

here is the select statement I'm trying to get working:

SELECT * FROM Unit WHERE Unit.id IN (SELECT DISTINCT unitId FROM
UnitOptions WHERE fieldname="targetArea" AND value="Berlin")

So... The above doesn't work...

The following works:

SELECT * FROM Unit WHERE Unit.id IN ('12345') 
-> returns the right values 

SELECT DISTINCT unitId FROM UnitOptions WHERE fieldname="targetArea"
AND value="Berlin" 
-> returns '12345'

even this works:

SELECT * FROM Unit WHERE Unit.id IN (SELECT DISTINCT unitId FROM
UnitOptions WHERE value="Berlin")

and to reveal more crazyness the following also:

SELECT * FROM Unit WHERE Unit.id IN (SELECT DISTINCT unitId FROM
UnitOptions WHERE fieldname IN ("targetArea") AND value="Berlin")


Any suggestions??

Sascha
-- 
.-> Sascha Matzke - sascha@bespin.de ------------------------.
|   We want the world and we want it now...                  |
|                                              Jim Morrison  |
`-- On this earth for  24 years,  355 days  <----------------'
-----------------------------------------------------------------------------
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.