Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Count

Status
Not open for further replies.

SymbionA

IS-IT--Management
Apr 16, 2007
45
AU
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top