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!

spooling when SELECT returns no records

danielkJun 14 2011 — edited Jun 14 2011
I'm spooling out to a file. Our documentation process requires that we spool out a BEFORE state, then make changes/updates and then spool out the AFTER state. I do this through a SELECT statement.

There are times when the BEFORE state of the data returns zero records, which is fine. Then the change occurs and I query for the AFTER state and that returns records and they're written to the file. However when I do the BEFORE state query and nothing is written to the file, that's not proof of that a SELECT was run.

I thought maybe I can have the query do a count and if the count was zero then write something to a file, like "no records found". However, I've not been able to figure out a method for doing that.

Any pointers?

If I'm not explaining this well, then ask me to clarify and I'll try to do so.

thank you.

daniel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 12 2011
Added on Jun 14 2011
4 comments
2,301 views