Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    4

    Question Unanswered: DTS Package - How to prevent a 0 byte file?

    I've created a DTS package -- that uses a query to export to a .txt file. My question is -- if the results of this query are zero (no results returned within the package ) -- how can I tell the package not to export a zero byte file. Any thoughts on that? Any help you could give would be greatly appreciated. Thanks!

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do you mean that the file doesn't exist (which would cause an error) or that it's a 0 length file?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Feb 2004
    Posts
    4
    the package is producing a file that is 0 length. what i'd like to be able to do is -- if the file produced is 0 in length -- i would like for it not to output a file at all....does that help?

  4. #4
    Join Date
    Jan 2004
    Location
    Romania - Bucharest
    Posts
    50
    Create a ExecuteSQL task that computes the COUNT() on your returning query and assigns it to a global variable. Then, create an ActiveX task that checks that global variable and performs the export only if it is noy null...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •