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 |
|
Warpig
Starting Member
1 Post |
Posted - 2005-01-06 : 09:35:31
|
| This code works fine in the query analyser but gives different results when you actualy return all rows from the table. Please help.CREATE PROCEDURE MassInsertASTRUNCATE Table ResultsINSERT INTO Results (EXPR1,ECNID )SELECT ECNID, MAX(UniqueID) AS EXPR1 FROM dbo.ECNGROUP BY ECNIDGO |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-01-06 : 09:52:34
|
change the order of columns in a select:INSERT INTO Results (EXPR1,ECNID )SELECT MAX(UniqueID) AS EXPR1, ECNID FROM dbo.ECNGROUP BY ECNIDGo with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|