multiple DML statements in task ?

  • Hi all ,

    i want to execute multiple sql statemets like two insert statement and one delete statement in DTS Package .

    which type of control or task i have to used ????

    Thanks

  • I'm thinking you would use the ExecuteSQL task, but if you explained what you are trying to achieve there might be a better solution.

     

    --------------------
    Colt 45 - the original point and click interface

  • thnax for it.

    i want to transfer data from sql server to excel. for that

    I want to drop and re-create an excel sheet , currently i have to used two sql task .

    1) for drop sheet

    2) create sheet

    in excel file .

    is there any other way to perform same thing in better way ??

  • If you want to drop and create the Excel spreadsheet then you will need to have both statements in the same ExecuteSQL task.

    There are a couple of other options though,

    1) Have a blank spreadsheet as a template and copy it each time you transfer the data. This will also allow you to apply some basic formatting to the cells.

    2) Export to a plain text file with fields seperated by tabs. Give the file a .csv extension and Excel will open it without any problems.

     

    --------------------
    Colt 45 - the original point and click interface

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

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