abort dts excecution if source query returns zero rows

  • Hi,

    I have a dts package which is supposed to create a csv file and

    then upload that file to an ftp server.

    Everything works fine except the destination file gets created and uploaded even if the source query returns no rows.

    I would like to prevent that.

    Can anyone enlighten me on how to do that please?

    Here's a rough schematic of my package

    activex Task(creates a file named from current date and time)

    sql server query

    write results of query to outputfile

    upload output file to ftp server(uses activex script task to execute a batch file)

    Mark uploaded rows as "completed"

  • Hi,

    I have no solution of this problem. I also have to upload one XML file to FTP server through ActiveX Sctipt task, so can you share your code for this...

    Thanx...Arpan

  • Can you try by inserting a check there:

    activex Task(creates a file named from current date and time)

    sql server query ---Check whether count(*) is greater than zero

    write results of query to outputfile

    upload output file to ftp server(uses activex script task to execute a batch file)

    Mark uploaded rows as "completed"

    Manu

  • I dont know if that's the best way to do it but i simply write my file to a directory and then use active x task to execute a batch file in that directory with in turn uses windows built in ftp utility to upload my files.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply