Skip to Content
avatar image
-1
Former Member

Dynamic SQL WHERE conditions

Hi,

I want to use a dynamic select statement like:

SELECT * FROM XYZ WHERE (ls_query_where_cond) INTO....

This woorks fine but I do not always have a where condition. This will raise a exception.

Can I completely remove this "where" dynamicly or do I have to use if statements to check if there any "where" condition before execution?

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 26, 2017 at 09:26 AM

    Did you read the online or F1 documentation on sql_cond - (cond_syntax)... look for 'If cond_syntax is initial'.

    Add comment
    10|10000 characters needed characters exceeded