macromedia.coldfusion.database_access
[Top] [All Lists]

Re: SQL query problem

Subject: Re: SQL query problem
From: "paross1" <webforumsuser@xxxxxxxxxxxxxx>
Date: Wed, 30 Jul 2008 15:21:13 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

Wow, I guess that you missed the entire point of the previous answers to your 
original question.....
 You would need to do an OUTER (LEFT) join. Also, you probably should list the 
fields that you want to select individually, rather than SELECT *. That way, 
you can perform alternative actions on those fields that may be NULL because 
they are in the joined table that has no matching rows.

 SELECT * 
 FROM ptcourses08 c 
 LEFT JOIN coursesession cs ON c.courseid = cs.sessioncourse
 ORDER BY c.courseTitle

 Phil



<Prev in Thread] Current Thread [Next in Thread>