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