Delete excel rows in dts

  • i have a dts that gets data, manipulates it and then stores the results in an excel file.  but now everytime i runt he dts i want it to delete what is in the excel file so it doesnt add the new data to it.  i have looked at this article: http://qa.sqlservercentral.com/columnists/jsack/capturingtheerrordescriptioninastoredprocedure.asp

    and followed it, recreated it exactely, and it still wont work, i get an error saying,

    "Error source: Microsoft JET database engine

    Error desciption: Syntax error in DROP TABLE or DROP INDEX"

    please help, this is most frustrating.

     

    thanks

  • The only thing I can think of to check is the character you use in the DROP TABLE syntax.

    If I use a single quote ' I get your error:

    "Error source: Microsoft JET database engine

    Error desciption: Syntax error in DROP TABLE or DROP INDEX"

    If I use a back quote or grave accent or back tic ` It works.

    Drop Table `New Table`

    Hope this helps!

  • I agreed with iBuildDW.

    I followed the same article and it's working well every time when i run dts package it dekets my old rows in excel sheet.

    For this you need to check that in Delet rows execute SQL Task you have selected Excel connection and in Drop Table Statement you have same table name as in Create table statement.

    Just check carefully becuase mine is working

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

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