How can I execute an Immediate IF in a SQL statement? (t-SQL)
Posted on 2007-11-14
I have a file, it has (5) check amount fields. I need to update the record with a field that will give the valid number of checks in the record. The possibilities are; 2 checks, or 5 checks. I can assume that if "check amount 3" has a zero value, expressed as '000.00' then it is a (2) check record, and if it is not '000.00' then it is a (5) check record.
I need to do this query along with several other updates at the same time. Is there a way to do something along the lines of a (iif check_number_3 = '000.00,'2','5')? inside an update statement?