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 |
ankur_gurha
Starting Member
20 Posts |
Posted - 2006-08-29 : 10:26:30
|
Hi,How do u do something like thisINSERT INTO #Srvname ( Srvcode , CodeName )Values( 622773258760115409 , 'Consultancy' ),( -8112270479827337889 , 'Cross Cultural Training'),( 4054511778913267481 , 'Departure'),( -3963967039857539357 , 'Departure'),( 2058088933942448396 , 'Education')I am trying to insert multiple values in the temp table in a same statement.. can by any chance we can do this is sql.Cheers,A.. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-08-29 : 10:32:09
|
INSERT INTO #Srvname ( Srvcode , CodeName )select 622773258760115409 , 'Consultancy' union allselect -8112270479827337889 , 'Cross Cultural Training' union allselect 4054511778913267481 , 'Departure' union allselect -3963967039857539357 , 'Departure' union allselect 2058088933942448396 , 'Education'Peter LarssonHelsingborg, Sweden |
 |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-08-29 : 10:41:58
|
Note that "Values" is used in an Insert statement, to insert a single record. May be, this can made more simpler, if u tell us what is the data sourceeg. if data is coming from a table, u can do a select querySrinika |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-29 : 12:01:40
|
If you try to insert data to temp table from other table thenInsert into #temp(columns)Select columns from OtherTableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|