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.
Author |
Topic |
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2013-08-27 : 05:57:42
|
Hi, I have the following code which gives results as shown below; SELECT dbo.tblPractice.PracticeCode, dbo.tblPractice.DateJoined, dbo.tblContacts.FirstName + ' ' + dbo.tblContacts.LastName AS FullName, dbo.tblContactType.ContactTypeFROM dbo.tblPractice INNER JOIN dbo.tblRegion ON dbo.tblPractice.RegionID = dbo.tblRegion.RegionId INNER JOIN dbo.tblContacts ON dbo.tblPractice.PracticeCode = dbo.tblContacts.PracticeCode INNER JOIN dbo.tblContactType ON dbo.tblContacts.ContactTypeID = dbo.tblContactType.ContactTypeIDResults:Practicecode DateJoined FullName ContactTypeA1 01/01/2001 John Smith PrimaryA1 01/01/2001 Peter Tim SecondaryI want to update my query so that it has ONLY one record as below; Practicecode DateJoined PriFullName SecFullNameA1 01/01/2001 John Smith Peter TimThank you |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
|
|
|
|