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 |
mfitz
Starting Member
5 Posts |
Posted - 2008-10-09 : 12:12:09
|
I have an insert statement:INSERT INTO #tempFinalSELECT distinct x.RespondentID From Respondents4 x with (nolock) inner join #temp y on x.respondentid = y.respondentid INNER JOIN RespondentSignupSourceStatus RSSS with (nolock) ON RSSS.RespondentID = x.RespondentID WHERE EligibleFlag = 1 and RSSS.OrgUnitID = 4When I run the insert, only 1 row gets inserted.But when I comment out the actual insert line and run the select statement, I get the correct amount of rows (approx. 20K). Has anyone seen this type of behavior in SQL 2005 Enterprise SP2? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-09 : 12:15:30
|
Nope. i have not seen it. It doesnt work that way either. Are you getting any error messages?Also how do come to conclusion that only 1 row gets inserted? from messages tab or checking actual data? |
 |
|
mfitz
Starting Member
5 Posts |
Posted - 2008-10-09 : 12:23:05
|
No error message.Message tab indicates 1 row inserted.I checked the table and 1 row was inserted. |
 |
|
mfitz
Starting Member
5 Posts |
Posted - 2008-10-09 : 12:38:11
|
I rebuilt the three indexes on RSSS and it works now.Visakh16 - thanks for the reply. |
 |
|
|
|
|