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 |
|
christina_rules
Starting Member
23 Posts |
Posted - 2007-06-09 : 01:14:31
|
| is there anyway i can merge select statement and insert statement together?what i want to do is select few attributes from a table and then directly insert the values to another table without another trigger.for example, select * from product and with the values from product, insert into new_product (name, type, date) values (the values from select statment) |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-06-09 : 01:43:59
|
| [code]INSERT INTO New_Product ( columns..)SELECT (Columns...)FROM ProductWHERE (Condition)[/code]Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-09 : 01:45:04
|
| Insert into new_product (name, type, date) Select name, type, date from productMadhivananFailing to plan is Planning to fail |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-09 : 01:45:42
|
Dinakar, you are too fast MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|