Showing posts with label append. Show all posts
Showing posts with label append. Show all posts

Sunday, February 19, 2012

File Generation through the DTS

I have created a DTS package (SQL 2000) that generates an Excel file.
The first time it works great but every time after that the DTS would
append the data to a file and not overwrite it. I need to be
overwritten. I tried to replace the generated file with the empty one
but it doesn't put any date in it.
How can I have my DTS package overwrite the excel file as opposed to
append to it?
Thank you,
T.I assume you are using the Export Data wizard to create the DTS
package. Start this process and choose an EXISTING spreadsheet. When
you get to the step where you select the table(s) to be exported, the
last column on the table line is headed Transform. Once you have
checked off the table to export, a button appears in that column;
click on that button. In the window that appears, on the Column
Mappings tab, there are options for Delete and Append. Choose Delete.
Be sure to Save the package.
Then you can either use the package it created, or inspect that
package to see how the Delete step was coded and copy that.
Roy Harvey
Beacon Falls, CT
On 8 Mar 2007 08:54:43 -0800, "tolcis" <nytollydba@.gmail.com> wrote:
>I have created a DTS package (SQL 2000) that generates an Excel file.
>The first time it works great but every time after that the DTS would
>append the data to a file and not overwrite it. I need to be
>overwritten. I tried to replace the generated file with the empty one
>but it doesn't put any date in it.
>How can I have my DTS package overwrite the excel file as opposed to
>append to it?
>Thank you,
>T.|||On Mar 8, 12:18 pm, Roy Harvey <roy_har...@.snet.net> wrote:
> I assume you are using the Export Data wizard to create the DTS
> package. Start this process and choose an EXISTING spreadsheet. When
> you get to the step where you select the table(s) to be exported, the
> last column on the table line is headed Transform. Once you have
> checked off the table to export, a button appears in that column;
> click on that button. In the window that appears, on the Column
> Mappings tab, there are options for Delete and Append. Choose Delete.
> Be sure to Save the package.
> Then you can either use the package it created, or inspect that
> package to see how the Delete step was coded and copy that.
> Roy Harvey
> Beacon Falls, CT
> On 8 Mar 2007 08:54:43 -0800, "tolcis" <nytolly...@.gmail.com> wrote:
> >I have created a DTS package (SQL 2000) that generates an Excel file.
> >The first time it works great but every time after that the DTS would
> >append the data to a file and not overwrite it. I need to be
> >overwritten. I tried to replace the generated file with the empty one
> >but it doesn't put any date in it.
> >How can I have my DTS package overwrite the excel file as opposed to
> >append to it?
> >Thank you,
> >T.
I am using a query to generate a resultset. In DTS I have a
connection object and destination spreadsheet. In the mappings I
don't see any delete or append.|||On 8 Mar 2007 10:48:19 -0800, "tolcis" <nytollydba@.gmail.com> wrote:
>I am using a query to generate a resultset. In DTS I have a
>connection object and destination spreadsheet. In the mappings I
>don't see any delete or append.
My example applied to the windows in the Wizard. I still suggest
following my example to see how the wizard codes the DELETE so that
you can copy the method in your DTS package.
Roy Harvey
Beacon Falls, CT