Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RIght outer join Problems
Message
From
21/12/2005 11:30:40
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
RIght outer join Problems
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01079896
Message ID:
01079896
Views:
61
I am trying to create a select statement in Query Analyzer to join two tables together and get all of the rows from the second table and the matching rows from the first table. Here is what I have come up with:

select b.township, b.range, b.section, b.stand, a.a, a.b, a.c, a.d, a.e, a.g, a.h, a.j,
a.k, a.l, a.m, a.n, a.o, a.p, a.s, a.t, a.w, a.hardwood, a.softwood, a.total
from lis_vol a right join InvStds b on
a.township+a.range+a.section+a.stand = b.township+b.range+b.section+b.stand
order by b.township+b.range+b.section+b.stand

The problems I am having is that it returns 9009 rows instead of 8999 which is the row count in the right table. In theory it should only return 8999 rows. What am I missing?
Next
Reply
Map
View

Click here to load this message in the networking platform