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 |
|
Prajwal
Starting Member
6 Posts |
Posted - 2005-07-03 : 15:27:59
|
| I am trying to write a query/stored procedure to:Insert all the values of all the fields of a table into another table having same no.of fields.In other words copying a table into another table. Can anyone help me...Thanks!!! |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-07-03 : 15:31:25
|
| INSERT??????Go to Start/All Programs/Microsoft SQL Server/Books OnlineGo to the index tab and type in "insert".It will give you several examples. You should be able to copy one of the examples and modify it slightly.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Prajwal
Starting Member
6 Posts |
Posted - 2005-07-03 : 18:41:22
|
| Yes... to Insert... Can someone give me a query/stored procedure |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-07-03 : 21:20:38
|
| Are you lazy??? Go to Books Online and copy/paste. We're here to help people, not do your work for you.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-04 : 01:59:19
|
| In BOL index, type Insert from queryThat will give example codeMadhivananFailing to plan is Planning to fail |
 |
|
|
Bredsox
Starting Member
4 Posts |
Posted - 2005-07-05 : 15:03:16
|
| For Lazy People like you, select * into TableA from TableB OR insert into TableA select * from TableB |
 |
|
|
|
|
|