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
 General SQL Server Forums
 New to SQL Server Programming
 Full Join

Author  Topic 

kashyapsid
Yak Posting Veteran

78 Posts

Posted - 2010-04-06 : 02:56:52
I have two tables and i want to execute the full join command, the data in both the tables is differ from each. how can i get the data combined

KaShYaP

kashyapsid
Yak Posting Veteran

78 Posts

Posted - 2010-04-06 : 02:59:21
The table names are alpha & padi

KaShYaP
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-04-06 : 03:16:52
--INNER JOIN WHEN YOU WANT ONLY MATCHING RECORDS
SELECT <ALPHA.COLUMNS>, <PADI.COLUMNS> FROM alpha INNER JOIN padi
ON ALPHA.<COMMON COLUMN> = PADI.<COMMON COLUMN>

--FULL OUTER JOIN WHEN YOU WANT ALL MATCHING AND UNMATCHING RECORDS
SELECT E.* , D.* FROM alpha E FULL OUTER JOIN padi D
ON E.<COMMON COLUMN> = D.<COMMON COLUMN>



Regards,
Bohra

I am here to learn from Masters and help new bees in learning.
Go to Top of Page

kashyapsid
Yak Posting Veteran

78 Posts

Posted - 2010-04-06 : 03:49:27
Thanks It works

KaShYaP
Go to Top of Page

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-04-06 : 03:55:39
welcome

Regards,
Bohra

I am here to learn from Masters and help new bees in learning.
Go to Top of Page
   

- Advertisement -