12 Replies Latest reply: Nov 6, 2017 6:23 PM by Peter Cammaert RSS

    If Statements in script

    Robyn Brooker

      I have a requirement where I'm using the following If statement in the load script.  I'd like to know if anyone has any suggestions to be more efficient.  Or is this the best way to do this?  Note that I have over 8 million records in this table.  Thanks in advance.


      If( (practice = 'A' or practice = 'B') AND (Payer='1') AND ServiceDate < '01/01/2000', 'code1',
      If( v75_svcSortName = 'C', 'code2'

      If(( practice ='A' or practice = 'B' or practice =’D’) AND (Payer ='2') AND  ServiceDate < '01/01/2005', 'code3', ‘other’ )))  AS BillingCode