spooling when SELECT returns no records
danielkJun 14 2011 — edited Jun 14 2011I'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