Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JOIN with a condition
Message
From
14/09/2006 09:33:42
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
JOIN with a condition
Miscellaneous
Thread ID:
01153646
Message ID:
01153646
Views:
61
What I am trying to do is create a generic ContactInfo table that has a field of ContactType to tell what type on contact it is, and then link to that table from a query where I only want a specific ContactType (in this case, 1). I thought the following join statement would work, but it seems to ignore that part of the statement.
FROM         ContactType RIGHT OUTER JOIN
                      ContactInfo ON ContactType.ContactTypeID = ContactInfo.ContactType AND ContactInfo.ContactType = 1 RIGHT OUTER JOIN
                      CustAddr ON ContactInfo.CustNum = CustAddr.CustNum
Anybody know what I am doing wrong? Thanks!
Very fitting: http://xkcd.com/386/
Next
Reply
Map
View

Click here to load this message in the networking platform