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 |
|
reggie
Starting Member
2 Posts |
Posted - 2009-06-08 : 19:40:14
|
| Hello,I am trying to figure out how to do an update query that would perform the following if it is possible but have had no luck as of yet.table1item whs date1234 1 1/5/091234 2 null5678 1 1/7/095678 2 nullI would like to update the date field to be the same for every item no matter what the whs column states. Below is what I would like to show after the query.table1item whs date1234 1 1/5/091234 2 1/5/095678 1 1/7/095678 2 1/7/09Any help would be great!!!Thanks. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-08 : 20:01:31
|
[code]update tset date = s.datefrom table1 t inner join table1 s on t.item = s.itemwhere t.date is nulland s.date is not null[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
reggie
Starting Member
2 Posts |
Posted - 2009-06-08 : 21:10:15
|
| You're awesome!Thanks much! |
 |
|
|
|
|
|