Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
I am trying to get a nested IIF statment to work in RS, but cannot find the correct syntax.I need it to accomplish the following:1. If the CreditCardType value = Credit Card and The payment Type = "A' , then return AMEX2.If the CreditCardType value = Credit Card and The payment Type = "M' , then return Master Card3. If the CreditCardType value = Credit Card and The payment Type = "V' , then return Visa4. If If the CreditCardType value = Check the return "Check=Fields!PaymentType.ValueFields!PaymentType.Value, Fields!PaymentType.Value, IIF(Fields!PaymentType.Value = "Credit Card" and Fields!CreditCardType.Value = "A", "AMEX,IIF(Fields!PaymentType.Value = "Credit Card" and Fields!CreditCardType.Value = "M", "Master Card",IIF(Fields!PaymentType.Value = "Credit Card" and Fields!CreditCardType.Value = "V", "Visa", "")Thanks,Debi
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts
Posted - 2011-05-31 : 15:03:20
Based on your description, I would think you want something like this: