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)
 Join Three Tables

Author  Topic 

ravininave
Posting Yak Master

111 Posts

Posted - 2010-04-03 : 08:36:32
I've three tables
1]OfficeMast
OffCode,OfficeName
2]Partners
PartCode,PartName
3]ClientMast
ClientName,OffCode,PartCode

I have To Show
ClientMast.ClientName,OfficeMast.OfficeName,Partners.PartName from ClientMast...




VB6/ASP.NET
------------------------
http://www.nehasoftec.com

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-04-03 : 08:41:43
[code]
select
ClientMast.ClientName,
OfficeMast.OfficeName,
Partners.PartName
from ClientMast
inner join Partners on ClientMast.PartCode = Partners.PartCode
inner join OfficeMast on ClientMast.OffCode = OfficeMast.OffCode
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

ravininave
Posting Yak Master

111 Posts

Posted - 2010-04-03 : 08:51:38
quote:
Originally posted by khtan


select
ClientMast.ClientName,
OfficeMast.OfficeName,
Partners.PartName
from ClientMast
inner join Partners on ClientMast.PartCode = Partners.PartCode
inner join OfficeMast on ClientMast.OffCode = OfficeMast.OffCode



KH
[spoiler]Time is always against us[/spoiler]





Thanx it solved my problem

VB6/ASP.NET
------------------------
http://www.nehasoftec.com
Go to Top of Page
   

- Advertisement -