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 |
Flateric
Starting Member
3 Posts |
Posted - 2013-06-02 : 07:42:54
|
Hello all,I would like to know how to move all information inside one table with following options.(MS SQL)Table has following columns(ID,x,z,u,email)I need to move all x,z,u data from rows where email is:1,2,3 to where email is:4.Can you help please?Thank you for your help in advance. |
|
Rasta Pickles
Posting Yak Master
174 Posts |
Posted - 2013-06-02 : 11:22:26
|
quote: Originally posted by Flateric Hello all,I would like to know how to move all information inside one table with following options.(MS SQL)Table has following columns(ID,x,z,u,email)I need to move all x,z,u data from rows where email is:1,2,3 to where email is:4.Can you help please?Thank you for your help in advance.
If I am interpreting your requirements correctlyUPDATE yourtablenameSET email = 4WHERE email IN ('1', '2', '3') |
 |
|
Flateric
Starting Member
3 Posts |
Posted - 2013-06-02 : 13:21:43
|
Thank you Rasta Pickles :)) |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-03 : 02:26:46
|
so does the rows for email 1,2,3 should remain?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
 |
|
|
|
|
|
|