Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script If statement causes ODBC error...?

Hi everyone,

Would anyone be able to offer a reason or solution to how an If statement causes an ODBC error.

............

      ,if(NOT(ISNULL(MedicalComplaint)) AND NOT(ISNULL(TraumaComplaint)),MedicalComplaint & ',' & TraumaComplaint,

        if(ISNULL(MedicalComplaint) AND NOT(ISNULL(TraumaComplaint)),TraumaComplaint,

          if(NOT(ISNULL(MedicalComplaint)) AND ISNULL(TraumaComplaint),MedicalComplaint))) as ChiefComplaint

However this one works, the only difference being the last line is ommitted.

..........

      ,if(NOT(ISNULL(MedicalComplaint)) AND NOT(ISNULL(TraumaComplaint)),MedicalComplaint & ',' & TraumaComplaint,

        if(ISNULL(MedicalComplaint) AND NOT(ISNULL(TraumaComplaint)),TraumaComplaint)) as ChiefComplaint

Many thanks in advance

1 Reply
danielrozental
Master II
Master II

Try posting the entire sentence. What vendor database are you trying? SQL Server?