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 |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-11-26 : 08:11:14
|
| Dear All,I am using stored proc to get the result set..intend i need to insert into another table straight way..how can we do this ??exec camparetable 'vw-Ob','TabletoCompare',1i need to insert the outout of the above query to one more table how can we do this ? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-26 : 08:27:58
|
| insert into table(columns)exec camparetable 'vw-Ob','TabletoCompare',1MadhivananFailing to plan is Planning to fail |
 |
|
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2009-11-26 : 09:41:52
|
| I am getting the following error..though even i have given number column equalmsg:213 level:16 state :7 Line 1 Insert error:column name or number of supplied values does not match table definition |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-11-26 : 11:55:40
|
| the names of the columns have to match as well. And the data types (I think)Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
|
|
|