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 |
jeff06
Posting Yak Master
166 Posts |
Posted - 2012-04-05 : 11:18:23
|
I have a table t1id name1 john2 tim3 jane4 foo....I want to move t1 to another sever in a stupid way. I need to generate following text from t1insert into #t1 values(1,'john');insert into #t1 values(2,'tim');insert into #t1 values(3,'jone');insert into #t1 values(4,'foo');....How can I do that?Thanks,Jeff |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2012-04-05 : 11:26:08
|
[CODE]select N'select into #t values(' + cast(id as nvarchar(10)) + N', ''' + name + ''');' SqlStmtfrom t1[/CODE]=================================================There is a foolish corner in the brain of the wisest man. -Aristotle, philosopher (384-322 BCE) |
 |
|
|
|
|