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 |
|
kazineel
Starting Member
16 Posts |
Posted - 2010-08-02 : 12:54:02
|
| I want to insert value with select statement,my query like thisINSERT INTO table1 (name, address, status) SELECT name, address FROM table1 where id=32how to insert status value='R' |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-08-02 : 12:59:32
|
INSERT INTO table1 (name, address, status) SELECT name, address, 'R' FROM table1 where id=32 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
kazineel
Starting Member
16 Posts |
Posted - 2010-08-02 : 13:01:21
|
quote: Originally posted by webfred INSERT INTO table1 (name, address, status) SELECT name, address, 'R' FROM table1 where id=32 No, you're never too old to Yak'n'Roll if you're too young to die.
Thanks Buddy |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-08-02 : 13:03:49
|
welcome  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-08-03 : 03:44:46
|
| Why are you inserting data to the same table?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|