Abdul Khan
asked on
Add a data line when the SQL SP creates a blank file
I use a SP to extract a CSV file daily, once in a while I get a blank file when there is no matching query; how do I add a line that simply says "No data today" and add it to my file when there is a blank file so my user can see the message..
Count the selected rows. If the count is >0, export the query. If the count is 0, export a single record with the message in it.
What does your query look like?
Can you please post the code you are using to retrieve the data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.