
Signature
O (=> useer(maupa)go2.pl 05011474(maupa)napier.ac.uk
)/\_,_[__] GG: 5004286 ICQ: 45007845
T>_ [ ] Wariat: człowiek cierpiący na dużą niezależność intelektualną.
> The thing is to estimate costs of making any garment with any
> materials. I need to join all garments to all materials, !
You're trying to produce what's called a Cartesian product.
This can be done in SQL simply by omitting any join condition. The
default join (with no condition limiting it) joins every row in one
table to every row in the other table:
SELECT GARMENT.*, MATERIAL.MATERIAL_NO
FROM GARMENT, MATERIAL;
This should work in Oracle, MySQL, or any other system that supports the
most rudimentary features of SQL.
Regards,
Bill K.
radnor - 24 Nov 2005 21:17 GMT
>SELECT GARMENT.*, MATERIAL.MATERIAL_NO
>FROM GARMENT, MATERIAL;
[quoted text clipped - 4 lines]
>Regards,
>Bill K.
Doh, I really need some rest. I've been making some subqueries to get
this instead of reminding simplest way. Thank you!
Regards
Kamil
jak zawsze pozdrawiający
radnor

Signature
O (=> useer(maupa)go2.pl 05011474(maupa)napier.ac.uk
)/\_,_[__] GG: 5004286 ICQ: 45007845
T>_ [ ] Wariat: człowiek cierpiący na dużą niezależność intelektualną.