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 |
Firemaple
Starting Member
14 Posts |
Posted - 2007-11-05 : 14:03:51
|
Hey all, I run the following statement and get odd results. There are no duplicates in "callnumber" in either table, but the results give me duplicate entries. Any ideas?SQL:select b.agentid, a.submitTime,a.callNum,a.[Description],b.email as "Users Email",a.Resolved, a.TimesCalled, a.OverallSat,a.Question1,a.Question2,a.Question3,a.Question4,a.Question5 from tblSurveyssent b inner join tblSurveyResults aon (a.callNum = b.callNumber) |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-05 : 14:10:53
|
Providing sample data that illustrates what you have in the tables plus showing us what your query is returning is always helpful. We can't see your environment, so you must help us "see" it.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-05 : 14:12:13
|
So, what you are saying is thatselect count(*), count(distinct callnum) from tblsurveyresultsgives two identical numbers? Andselect count(*), count(distinct callnumber) from tblsurveyssentalso returns two identical numbers? E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|
|