Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alandilworth
Partner - Contributor III
Partner - Contributor III

If statement limitations in load script

Is it not possible to use if statements anywhere in the load script?  It appears to me that it is only allowed inside table load statements.

For example, this is acceptable:

Table:
Load  col1,
            col2,
            col3,
            IF(1+1=2,then,else) AS col4
Resident TempTable;

But this is not:

IF(1+1=2,then,else)

Table:
Load  col1,
            col2,
            col3,
            col4
Resident TempTable;

I'm finding this to be a very big limitation.  I'm hoping either I'm doing something incorrect or there is a workaround.

Thanks!

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

I believe it is your syntax, If Syntax 

 

IF 1+1= 2 Then

   Something Here

Else

 Something Here

EndIF

 

View solution in original post

1 Reply
jwjackso
Specialist III
Specialist III

I believe it is your syntax, If Syntax 

 

IF 1+1= 2 Then

   Something Here

Else

 Something Here

EndIF