Unique record

C

Cam Evenson

I am quering a table that has two entries in it with the word area in the
record. From some odd reason the query eliminates one of the two records
even though they are both unique. Is there a way to show both of these
records without displaying all the other duplicates?itles

SELECT DISTINCTROW Teams.TeamDesc, CoursesMaster.CourseTitle,
CoursesMaster.InstructionMethod
FROM ((Teams INNER JOIN TeamTrain ON Teams.TeamID = TeamTrain.TeamID) INNER
JOIN CoursesMaster ON TeamTrain.CourseID = CoursesMaster.CourseID) INNER
JOIN Sessions ON CoursesMaster.CourseID = Sessions.CourseID;


I have two CourseTitles that have the word "Area" at the begining.
 
J

Jerry Whittle

I bet that it is one of the INNER JOINs. If there isn't a matching record in
one of the tables, no record will be returned. Try changing one of them to
LEFT JOIN. If that doesn't work, change the other. You might even need to
have both of them say LEFT JOIN. If that doesn't work, then try different
combinations of RIGHT JOIN. A worse case would be the need for a combination
of RIGHT and LEFT joins.

Therefore you might consider simplfying the query so that only two tables
are joined to see what is returned. Fix it if needed then add the third table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top