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 |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2007-11-15 : 14:58:50
|
| Can someone tell me why I am getting duplicate data showing up? Here's my query:SELECTTitles.titleid, titles.title, titles.[descriptions], resources.quantityowned, classifications.[description] FROM Titles JOIN resources ON Titles.titleid = resources.titleid JOIN titleclassification ON Titles.titleid = titleclassification.titleid JOIN classifications ON titleclassification.classificationid = classifications.classificationid where titles.titleid='497' |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-15 : 15:01:19
|
| Because that's what is in your tables. Post some sample data for us to look at and what you want it to return.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2007-11-15 : 15:09:53
|
| Here's the results of my query. See how the description is repeating. I should have one title per each description. Table is not listing it.TitleID Title Descrip Qty Description497 High Performance Teamwork NULL 7 Attitude497 High Performance Teamwork NULL 7 Communication497 High Performance Teamwork NULL 7 Coaching497 High Performance Teamwork NULL 7 Facilitation497 High Performance Teamwork NULL 7 Teams497 High Performance Teamwork NULL 7 Attitude497 High Performance Teamwork NULL 7 Communication497 High Performance Teamwork NULL 7 Coaching497 High Performance Teamwork NULL 7 Facilitation497 High Performance Teamwork NULL 7 Teams497 High Performance Teamwork NULL 7 Attitude497 High Performance Teamwork NULL 7 Communication497 High Performance Teamwork NULL 7 Coaching497 High Performance Teamwork NULL 7 Facilitation497 High Performance Teamwork NULL 7 Teams497 High Performance Teamwork NULL 7 Attitude497 High Performance Teamwork NULL 7 Communication497 High Performance Teamwork NULL 7 Coaching497 High Performance Teamwork NULL 7 Facilitation497 High Performance Teamwork NULL 7 Teams497 High Performance Teamwork NULL 7 Attitude |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-15 : 15:16:16
|
| We'd have to see the data in your tables too that meet the join criteria.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2007-11-15 : 15:27:04
|
| Never mind I got it. I was joining two other tables I didn't need. Thanks for you help. |
 |
|
|
|
|
|