Re: SQL select rows conditional on same select

2002-07-10 Thread Carl Franks
Thanks Chuck! The last example you gave looked just right, but when I ran it, it returned an error. A quick look at the mysql manual revealed that UNION SELECTs are on the TO DO list for mysql :( With the examples you provided though, I was able to create the following statement which returns

SQL select rows conditional on same select

2002-07-09 Thread Carl Franks
Hi, I have 2 tables, X and Y. table X table Y ++---+ ++---+ | id | title | | id | assoc | ++---+ ++---+ | 1 | one | | 1 | 3 | | 2 | two | | 2 | 3 | | 3 | three | | 2 | 4 | | 4 | four | ++---+ | 5 | five |