> SELECT * FROM TABLEB WHERE ID IN (
> SELECT IDB FROM TABLEA WHERE IDC = 1 AND IDD IN (1, 3)
> )
Yes, I think you are right - I'll do some extensive testing of course, but it
looks good logically.
Thank you!
Dennis
___
sqlite-users mailing list
On Tue, Sep 8, 2009 at 12:58 AM, Dennis Volodomanov wrote:
> Thank you for the quick replies and sorry for not being too clear.
>
> I will try to state the problem more clearly, without my own attempts to
> solve it, as they are incorrect anyway.
>
> The simplified schemas again:
>
> CREATE TABLE
Thank you for the quick replies and sorry for not being too clear.
I will try to state the problem more clearly, without my own attempts to solve
it, as they are incorrect anyway.
The simplified schemas again:
CREATE TABLE TABLEA ( ID INTEGER PRIMARY KEY, IDB INTEGER, IDC INTEGER, IDD
INTEGER
On 8 Sep 2009, at 6:31am, Dennis Volodomanov wrote:
> Let's say we've got 4 tables:
>
> CREATE TABLE TABLEA ( ID INTEGER PRIMARY KEY, IDB INTEGER, IDC
> INTEGER, IDD INTEGER );
> CREATE TABLE TABLEB ( ID INTEGER PRIMARY KEY, DATA );
> CREATE TABLE TABLEC ( ID INTEGER PRIMARY KEY, DATA );
> CREA
On Tue, Sep 8, 2009 at 12:31 AM, Dennis Volodomanov wrote:
> Hello all,
>
> A small SQL problem, no doubt, for experts here.
>
> Let's say we've got 4 tables:
>
> CREATE TABLE TABLEA ( ID INTEGER PRIMARY KEY, IDB INTEGER, IDC INTEGER, IDD
> INTEGER );
> CREATE TABLE TABLEB ( ID INTEGER PRIMARY KEY
Dennis Volodomanov wrote:
> SELECT * FROM TABLEB WHERE ID IN ( SELECT IDB AS ID FROM TABLEA LEFT JOIN
> TABLEB ON IDB=1 )
First of all, "IDB=1" isn't a join condition; it doesn't compare a column from
TABLEA with a column from TABLEB. Did you mean to say "WHERE" rather than
"ON"?
In which c
Hello all,
A small SQL problem, no doubt, for experts here.
Let's say we've got 4 tables:
CREATE TABLE TABLEA ( ID INTEGER PRIMARY KEY, IDB INTEGER, IDC INTEGER, IDD
INTEGER );
CREATE TABLE TABLEB ( ID INTEGER PRIMARY KEY, DATA );
CREATE TABLE TABLEC ( ID INTEGER PRIMARY KEY, DATA );
CREATE TAB
7 matches
Mail list logo