Page 1 of 1

[SOLVED] Which join should I be using

Posted: Fri Aug 24, 2007 8:04 am
by impulse()
I have 2 tables and I want all the data from table 1 to be displayed and I want 1 field from table 2 to be joined onto the side, whether the field is blank or contains data. But at the moment it's either outputting 38,000+ rows when there should only be 3000 rows.

Posted: Fri Aug 24, 2007 8:16 am
by Oren
Sounds like a LEFT JOIN to me, but we can't help you... You need to give us more information.

Posted: Fri Aug 24, 2007 8:26 am
by impulse()
It was my fault, I was being totally stupid and joining on the wrong fields. It was a left join though.

Posted: Fri Aug 24, 2007 4:38 pm
by califdon
impulse() wrote:It was my fault, I was being totally stupid and joining on the wrong fields. It was a left join though.
We've all done that, but please do us a favor: please go back and edit the Subject of your post to indicate [RESOLVED] so that hundreds more of us don't spend the time reading the thread, only to realize that there is no longer a problem. Thank you.