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 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2005-04-13 : 10:25:01
|
| I have a select statement and use insert into along with it to input data in the table.Insert into Reseller (ResellerAccountNo,ResellerName)Select ResellerAccountNo,ResellerCustomerName from TempViewI need to change the select into something like this:Select Distinct RowId,ResellerAccountNo,ResellerCustomerName from TempViewBut I dont have a valid column for RowId in Reseller Table, So how can I use the insert into statement here.Karunakaran___________NOTHING IS IMPOSSIBLE, IMPOSSIBLE JUST TAKES LONGER... |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2005-04-13 : 10:42:11
|
| Insert into Reseller (ResellerAccountNo,ResellerName)Select a.ResellerAccountNo,a.ResellerCustomerName from (Select Distinct RowId,ResellerAccountNo,ResellerCustomerName from TempView) aDoes this work? (havent tried it) |
 |
|
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2005-04-13 : 11:22:06
|
| Looks like it will work.I'll give it a try and let you know.Karunakaran___________NOTHING IS IMPOSSIBLE, IMPOSSIBLE JUST TAKES LONGER... |
 |
|
|
|
|
|