Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert Dummy Records when SELECT returns No Data

SQLE KumarOct 5 2022

Hi All,
We need to insert Data into a table using a select query.
But when the select query does not return any data we have to Insert Dummy Records, but the problem is just to insert Dummy records we are using NOT EXISTS and the the whole Select which is huge and time consuming.
This approach increases Line of code nd affects readability and
Extra time is consumed to execute a whole Select
We are using Oracle 19c and this Insert script runs one after the another
Pasting Sample query , Original Query is huge.
Sample Create , Insert query in attached Notepad file.
Dummy Record Issue.txt (2.39 KB)

This post has been answered by mtefft on Oct 5 2022
Jump to Answer
Comments
Post Details
Added on Oct 5 2022
10 comments
1,777 views