can we do Ineer Join using 3 table to display result [Resolved]

Posted by Pallubhosale under Sql Server on 1/8/2014 | Points: 10 | Views : 1027 | Status : [Member] | Replies : 2
Hi,
Can We do inner join with three table???
If Yes..
I have 3 tables TRANING, PARTICULARS AND PERSONAL
In TRANING - FILENO,STARTDATE,STARTDATE,COURSETITLE

In PARTICULARS -FILENO,NAME,NRIC

In PERSONAL - NRIC,OLDNRIC,NAME

I want to display below records
FileNo,COURSETITLE,NRIC,OLDNRIC,NAME,STARTDATE,STARTDATE

Thanks

Pallavi


Responses

Posted by: kgovindarao523-21772 on: 1/8/2014 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Yes, We can do inner join three tables in sql server.
Select t.FileNo,t.COURSETITLE,p.NRIC,per.OLDNRIC,p.NAME,t.STARTDATE,t.STARTDATE
from TRANING t
Inner Join PARTICULARS p ON t.FILENAME=p.FILENAME
Inner Join PERSONAL per ON p.NRIC=per.NRIC

Thank you,
Govind

Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 1/8/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Yes we can do

Select T.FileNo,T.COURSETITLE,P.NRIC,PN.OLDNRIC,P.NAME,T.STARTDATE,T.ENDDATE From TRANING T Inner Join PARTICULARS P
On T.FileNo = P.FileNo
Inner Join PERSONAL PN
On T.Name = PN.Name


Pallubhosale, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response