Background documentation-7080: Query in statement not allowed Locate this document in the navigation structure

 

Explanation

The search condition of an IF or WHILE statement contains a QUERY statement. This is not allowed.

User Response

Execute the QUERY statement outside of the IF or WHILE statement, and save the results in program variables. Then use these results in the IF or WHILE statement.