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 |
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2008-10-09 : 05:04:42
|
| I need to copy some data from a field but not sure how you do it?any ideas. This place is a SQL wonderland!!JT |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-09 : 05:05:41
|
| copy to where? |
 |
|
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2008-10-09 : 05:08:50
|
| same database but to another fieldJT |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-09 : 05:14:15
|
| UPDATE TableSET DestField=SourceFieldWHERE yourconditions |
 |
|
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2008-10-09 : 10:08:44
|
| would this work then?UPDATE Table_nameSET mail17date=mail17date2WHERE blank like '1045'JT |
 |
|
|
Topaz
Posting Yak Master
199 Posts |
Posted - 2008-10-09 : 11:06:51
|
| the above yay or nay?JT |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-09 : 12:08:39
|
quote: Originally posted by Topaz would this work then?UPDATE Table_nameSET mail17date=mail17date2WHERE blank like '1045'JT
if you are using like use wildcards in which case it will update all columns where value contains pattern 1045 anywhere in it.And if your reqmnt is to update only those records having blank value as 1045 use = instead of like |
 |
|
|
|
|
|