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 |
Anup Shah
Starting Member
14 Posts |
Posted - 2006-01-24 : 21:45:03
|
i am executing this scripts in sql server2000SELECT'INSERT into temp values(data1, data2, data3)' + 'SELECT ' + CONVERT(VARCHAR(20), temp2.data1) + ', ' + CONVERT(VARCHAR(20), temp2.data2) + ', ' + '''' + CONVERT(VARCHAR(20), temp2.data3) + ''''FROM temp, temp2order by temp2.data1now my table temp and temp2 both has folowing fields and data typedata1 intdata2 intdata3 varchar(20)befor execution i have 0 records in temp and 10 records in temp2.this scripts supposed to add all 10 records from temp2 to temp but it does nothing. evevn it is not giving error too. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-24 : 21:49:04
|
Don't quite understand what your script is doing. Can't you do this directly ?insert into temp (data1, data2, data3)select data1, data2, data3from temp2 ----------------------------------'KH'I do work from home but I don't do homework |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-24 : 22:05:05
|
Sam has already reply on this post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=60791 at 17:48. Why the need to create a new post at 21:45 ?If you still have any problem, please reply to the original post.----------------------------------'KH'I do work from home but I don't do homework |
|
|
Anup Shah
Starting Member
14 Posts |
Posted - 2006-01-24 : 22:44:31
|
sorry guiesthat will not happen againI apologies for that. |
|
|
|
|
|
|
|