sql server - Combining IIF statements in ssrs -
i'm trying combine following iif statements in ssrs , cannot seem code correct run. can help?
=iif(isnothing(fields!description.value) , fields!callflag.value = "1" , "new record dial", fields!description.value, iif(isnothing(fields!description.value) , fields!callflag.value = "0" , "do not call", fields!description.value, iif(isnothing(fields!description.value) , isnothing(fields!callflag.value), "load reject", fields!description.value)
the iif statement reads iif(boolean, true-value, false-value). in case mean: if callflag=1 "new record" else if callflag=2 then.......
that lead to:
=iif(isnothing(fields!description.value) , fields!callflag.value = "1" , "new record dial", iif(isnothing(fields!description.value) , fields!callflag.value = "0" , "do not call", iif(isnothing(fields!description.value) , isnothing(fields!callflag.value), "load reject", fields!description.value ) ) )
if reconfigure get:
=iif(isnothing(fields!description.value) , fields!callflag.value = "1" , "new record dial", iif(isnothing(fields!description.value) iif(isnothing(fields!callflag.value), "load reject", iif(fields!callflag.value = "0" , "do not call", iif(fields!callflag.value = "1" , "new record dial", "error on callflag value") ) ) , fields!description.value)
or better: if use sql-server tag indicates, use case command... case command in sql
Comments
Post a Comment