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 |
|
staticbob
Yak Posting Veteran
99 Posts |
Posted - 2006-02-01 : 08:03:08
|
| Hi,I have this SQL view, both tables have a field "InspectionAreaName", I would only like to return the value from the IA table join field if the value in the IR table is null.Could somebody help please ?ThanksBobSELECT ir.*,ia.name as InspAreaNameFROMInspectionRecord irjoininspectionarea ia on ia.id = ir.inspectionarea"I dislilke 7am. If &am were a person, I would kick 7am in the biscuits." - Paul Ryan, dailyramblings.com |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-01 : 08:10:05
|
something like this ?isnull(ir.col1, ia.col1) ----------------------------------'KH' |
 |
|
|
staticbob
Yak Posting Veteran
99 Posts |
Posted - 2006-02-01 : 08:15:26
|
| Exactly that, thankyou."I dislilke 7am. If &am were a person, I would kick 7am in the biscuits." - Paul Ryan, dailyramblings.com |
 |
|
|
|
|
|