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 2000 Forums
 SQL Server Development (2000)
 Sql Help

Author  Topic 

bgawde
Starting Member

1 Post

Posted - 2003-07-30 : 10:38:35

Clients
-------------------------
CID (PK)
ClientName

Staff
----------------------------
SID (PK)
StaffName


ClientStaff
-----------------------------
SID (FK, PK)
CID (FK, PK)

for each client there may be 3 staff associated......

So I want to write a query which will return me results like

ClientName1 StaffName1 StaffName2 staffname3
ClientName2 StaffName1 StaffName2 staffname3
ClientName3 StaffName5 StaffName6 staffname3
ClientName4 StaffName10 StaffName22 staffname33

Thanks

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-07-30 : 11:01:13
Take a look
http://www.sqlteam.com/SearchResults.asp?SearchTerms=cross
Go to Top of Page
   

- Advertisement -