Skip to Content
-1

Dynamic SQL WHERE conditions

Sep 26, 2017 at 09:20 AM

36

avatar image
Former Member

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!

SQL
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Sep 26, 2017 at 09:26 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

ups.. I'm sorry.

0