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: select madness


Sascha

What version of InstantDB are you using?

> SELECT * FROM Unit WHERE Unit.id IN (SELECT DISTINCT unitId FROM
> UnitOptions WHERE fieldname="targetArea" AND value="Berlin")
>
> So... The above doesn't work...

Do you get an exception, or does it return the wrong data? If the wrong data
then too much or too little or just the wrong value?

A script that creates the two tables, adds some data to illustrate the
problem would really help.

Regards

Pete

--

Peter Hearty                         peter.hearty@lutris.com
Lutris Technologies (UK)        http://www.lutris.com
----- Original Message -----
From: "Sascha Matzke" <sascha@bespin.de>
To: <instantdb@enhydra.org>
Sent: Tuesday, October 03, 2000 2:39 PM
Subject: 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.
>

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