I seem to have a problem with finding where my parens go in this formula and feel as if I have tried them all.
Can anyone help shed some light on this for me?
If {AUT.REFTP} = "HPC" and {AUT.ESTADDATE} in {@Beg date} to {@End date} then "H New"
Else
If {AUT.REFTP} = "HPC" and {AUT.ESTADDATE} < {@Beg date} and {AUT.STAT} = "AHPC" then "HPC Existing"
Else
If {AUT.REFTP} = "HPC" and {V_SDENDSRVCDT.ENDSRVCDT} between {@Beg date} to {@End date} and {AUT.ESTADDATE} = "AHPCC" then "HPC Existing"
Else
If {AUT.REFTP} = "DIA" and {AUT.STAT} = "App" and {AUT.ESTADDATE} in {@Beg date} to {@End date} then "D New"
Else
If {AUT.REFTP} = "DIA" and {AUT.STAT} = "App" and {AUT.ESTADDATE} < {@Beg date} and isnull {V_SDENDSRVCDT.ENDSRVCDT} or {V_SDENDSRVCDT.ENDSRVCDT} between {@Beg date} to {@End date} then "D Existing"
I know I should know this and might just need to walk away for a day and come back, but I don't have that timeframe unfortunately. Any help or light to help shed on this, very much appreciated in advance.