Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Need JOIN Help (Resolved :))

Author  Topic 

nilaavu
Starting Member

18 Posts

Posted - 2007-01-19 : 16:08:37
shipdate units
2007-01-01 3
2007-11-01 2


orderdate Ordunits
2007-02-01 5
2007-11-01 21

How can I do the JOIN to get the below result?

shipdate units orderdate Ordunits
2007-01-01 3 null null
null null 2007-02-01 5
2007-11-01 2 2007-11-01 21

Any help appreciated
thx


SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-19 : 16:22:29
select shiptable.*, ordertable.*
from shiptable
full join ordertable on ordertable.orderdate = shiptable.shipdate


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

nilaavu
Starting Member

18 Posts

Posted - 2007-01-19 : 16:38:27

Thank you ..


quote:
Originally posted by Peso

select shiptable.*, ordertable.*
from shiptable
full join ordertable on ordertable.orderdate = shiptable.shipdate


Peter Larsson
Helsingborg, Sweden

Go to Top of Page
   

- Advertisement -