MySQL Forums
Forum List  »  Microsoft SQL Server

Null Match Prob
Posted by: Tim Whelan
Date: January 17, 2006 04:45AM

Hi i am havin a bit of trouble tryin to get a match based on a null value in a table, there are 4 tables based on the id that is on the bottom table which is null in some of them, i use dif ids to get to the top table and use the namethat is in there this is the code i am using i am just wondering ifanyone has any ideas of how to work around this problem

select ssg.Name + ' ' + supt.Name + ' ' + st.Name as name, st.name as '4th', supt.name as '3rd', ssg.name as '2nd', sg.name as '1st'
from session s
left join sessionActivity sa on sa.SessionId = s.Id
left join SessionType as st on st.ID = sa.SessionType
left join SessionSuperType as supt on supt.ID = st.SuperTypeId
left join SessionSubGroup as ssg on ssg.ID = supt.SessionSubGroupId
left join SessionGroup as sg on sg.ID = ssg.SessionGroupId
where sg.Id <> 8
and sg.Id <> 9
and s.ID = 50

Options: ReplyQuote


Subject
Written By
Posted
Null Match Prob
January 17, 2006 04:45AM
January 20, 2006 06:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.