June 11, 2004 at 12:07 pm
I have a simple DTS package that loads a text file to a table. The package is executed by a nightly, scheduled job. Sometimes the input file is empty which causes the job to report a failure. I'd like the job to report success whether the input file is empty or not. Is there a way to do that? Thanks
June 11, 2004 at 3:48 pm
You could write a sql script to check that the size of the file is greater than 0, if not, don't execute the dts. The script would need to create a temp table, then insert into the temp table by shelling out to command prompt (xp_cmdshell) and do a dir command for the file. You would then parse out the file size from that.
Steve
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy