Subject | Re: [firebird-support] Self join |
---|---|
Author | Helen Borrie |
Post date | 2006-02-05T11:23:59Z |
Please TRIM YOUR POSTS!!
At 10:00 PM 5/02/2006, you wrote:
1, 12345, 2, 12345
1, 34234, null, null
What are you actually getting? we should start from there.
^ heLen
At 10:00 PM 5/02/2006, you wrote:
>If I doNo, with a left join you will get
>SELECT A.barcode FROM shops A WHERE A.shop_id IN (1, 2);
>I will get all barcodes from shops 1 and 2 but I don't want to get that. I
>would like to know which barcodes from shop 1 are not in shop 2? I tought
>that if I left join those two table with following
>SELECT A.shop_id, A.barcode, B.shopId, B.barcode FROM shops A LEFT JOIN
>shops B ON (A.barcode =
>B.barcode) WHERE A.shop_id = 1 AND B.shop_id = 2;
>I will get something like
>1, 12345, 2, 12345
>1, 34234, 2, null
1, 12345, 2, 12345
1, 34234, null, null
What are you actually getting? we should start from there.
^ heLen
>Damir