I have a simple query that checks to see if there are any invalid values within a table. If there are invalid values it writes the results to a BAD file.
However, I want the BAD file to be 0kb if there are no invalid records. I have used the SET NORCOUNT ON command in my query i.e
isql -Usa -Psa -d%GAINS_DATABASE_AND_DEVICE_NAME% -n -s -w500 -h-1 -o %GAINS_BATCH_LOGDIR%SkulExtra_Char4.bad -Q"set nocount on Select skul_no from skulextra where char4 = ''"
But the BAD created is 1KB (with no invalid records) which I conclude is a result of the EOF marker??, how can I prevent the EOF marker being written in my query to ensure the BAD file created is 0KB?
Thnaks in advance
However, I want the BAD file to be 0kb if there are no invalid records. I have used the SET NORCOUNT ON command in my query i.e
isql -Usa -Psa -d%GAINS_DATABASE_AND_DEVICE_NAME% -n -s -w500 -h-1 -o %GAINS_BATCH_LOGDIR%SkulExtra_Char4.bad -Q"set nocount on Select skul_no from skulextra where char4 = ''"
But the BAD created is 1KB (with no invalid records) which I conclude is a result of the EOF marker??, how can I prevent the EOF marker being written in my query to ensure the BAD file created is 0KB?
Thnaks in advance