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 |
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2008-08-25 : 15:06:32
|
I'm trying to figure out the syntax on an RS expression, but keep getting compile error msgs. Example below:If Title value = "Director" OR Title value = "Mgr" AND IF SupervisorName value = "Jane Smith" THEN "Las Vegas" ELSE IF SupervisorName value = "John Doe" THEN "Ft. Laud" ELSE SupervisorName ValueELSEIF Title value <> "Director" AND Title value <> "Mgr" THEN"No Manager"What would be the RS syntax for a nested if statement?thx,John |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-26 : 00:03:31
|
use nested IIF or Switch. something likeIIF(Fields!Title.value = "Director" OR Fields!Title.value = "Mgr", IIF( Fields!SupervisorName.value = "Jane Smith","Las Vegas",IIF (Fields!SupervisorName.value = "John Doe" ,"Ft. Laud" ,Fields!SupervisorName.value)),IIF(Fields!Title.value <> "Director" AND Fields!Title.value <> "Mgr","No Manager",Nothing)) |
|
|
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2008-08-26 : 17:02:23
|
I was very close but my syntax kept erroring out.Thx,John |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-27 : 00:07:26
|
did my soln work? |
|
|
latingntlman
Yak Posting Veteran
96 Posts |
Posted - 2008-08-27 : 14:52:47
|
Yes it did!!Thx a bunch, |
|
|
JeniQ
Starting Member
29 Posts |
Posted - 2009-06-09 : 16:02:17
|
Helpful, thanks! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-10 : 14:34:41
|
welcome |
|
|
|
|
|
|
|