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 |
|
rusmanicai
Starting Member
13 Posts |
Posted - 2011-12-23 : 11:39:24
|
| Hello,I have a weird situation where I need to look at a table and display a field value if condition 1 is met or pull value from a different record if condition 2 is met.Below is my formula but I get 'Department Unknown' on everything that meets condition 2. I have no clue how to fix this or if it is even possible to populate same field with values from same field, same table.Your help is appreciated.Thank you,Julia.--here I select all records for which I need to update UserDefined1 fieldselect * from OrderComponentwhere OrderComponent.LotNumber<>''order by JobNumber--this is my attempt to update the field:)update OrderComponentset UserDefined1=UserDefined1where OrderComponent.LotNumber=OrderComponent.JobNumberRJulia |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-23 : 12:22:44
|
| with some sample data, explain how you want update to perform------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|