Glad you found it yourself. Maybe next time we'll be able to help a bit quicker.
See you.
Ronald
What Kind of Join Do I need?
Collapse
X
-
fixed it, i needed a LEFT JOIN!!
SELECT c.id, c.caseNumber, t.courtDate FROM `case` as c LEFT JOIN trial as t ON c.id = t.caseID;
... just in case anybody else comes across this page.
-DLeave a comment:
-
What Kind of Join Do I need?
I have two tables, i do a simple join on it (the only one i know how)
but i want the results to show even though the join a.... ahh...
here i can show you faster than i can tell you....
Case table.
id,
caseNumber
Trial table
id
caseID //foreign key to Case.id
courtDate
I want a query that gives me all the cases even though they dont' have a row in the Trial table.
How do i do that?
My query is simplified to show the point, but it involves 5 tables.
Thanks in advance!
Dan M.Tags: None
Leave a comment: