My brain is still in xmas mode, and what should be simple sql is a
challange!

I want to do a query, that lists all the products , with a column with a
yes/no (boolean/bit) column to say if the product is available in that shop
or not

so with

[Product]
pk      product
------------------
1       product1
2       product2
3       product3

[Shop]
pk      shop
--------------
1       shop_1
2       shop_2


[ShopProduct]
FKProduct       FKShop
-------------------
1               1
1               2
2               1
3               2


I should have

Shop            product available
------------------------------
shop_1  product1        yes
shop_1  product2        yes
shop_1  product3        no
shop_2  product1        yes
shop_2  product2        no
shop_2  product3        yes

I know its a CROSS JOIN between shop and product with a outer? join on the
ShopProduct table but just can't get it together...

Thanks

Justin




-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to