I am doing some an in-depth processing of data from one database which results in few or no exceptions.
I use a dynamic query to bring some fields from another database and do further processing.
The issue is when I have no data resulting in an exception - the dynamic SQL query fails. What's the best way around this problem?
My dynamic query is simple & complies all the incoming exception IDs into a list using cross-tab& passes it in the query:
Select * from abc
where data = '20221205'
and ID in ('898989', 99999')
I appreciate any help and suggestions.