Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic SQL WHERE conditions

Former Member
0 Likes
788

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!

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
629

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

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
630

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

Read only

0 Likes
629

ups.. I'm sorry.