dbTalk Databases Forums  

Need to overwrite text file, not append to file in DTS package...h

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Need to overwrite text file, not append to file in DTS package...h in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
khan_salim
 
Posts: n/a

Default Need to overwrite text file, not append to file in DTS package...h - 02-24-2005 , 12:47 PM






Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text file defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is appended
with new data so the text file grows larger and larger each time it is run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder for 1 day.

I am not a VB programmer so any VB solutions need to be simple and well
explained. Is it possible to implement a solution in DTS without VB?

Thanks,

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Need to overwrite text file, not append to file in DTS package...h - 02-24-2005 , 01:49 PM






How have you created the package?
What options did you choose.
By default a text file would overwrite.

You could easily before the DataPump happens copy the last file away
somewhere. DTS will generate a new one.

Allan


"khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote

Quote:
Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text file
defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is appended

with new data so the text file grows larger and larger each time it is
run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder for 1
day.

I am not a VB programmer so any VB solutions need to be simple and well
explained. Is it possible to implement a solution in DTS without VB?

Thanks,


Reply With Quote
  #3  
Old   
khan_salim
 
Posts: n/a

Default Re: Need to overwrite text file, not append to file in DTS package - 02-24-2005 , 02:13 PM



I created the package several months ago so I am not aware of any options I
chose to append to the text file rather then overwrite it. I would not have
chosen such an option if I were aware of it. As for copying the file away to
another location I am not aware of how to do this in a DTS package. Any
ideas? Is there a way of changing the DTS package so that text files are
overwritten? I have looked and I have been unable to find such an option
within the DTS package properties.


"Allan Mitchell" wrote:

Quote:
How have you created the package?
What options did you choose.
By default a text file would overwrite.

You could easily before the DataPump happens copy the last file away
somewhere. DTS will generate a new one.

Allan


"khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message
news:khan_salim (AT) discussions (DOT) microsoft.com:
Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text file
defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is appended

with new data so the text file grows larger and larger each time it is
run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder for 1
day.

I am not a VB programmer so any VB solutions need to be simple and well
explained. Is it possible to implement a solution in DTS without VB?

Thanks,



Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Need to overwrite text file, not append to file in DTS package - 02-24-2005 , 02:51 PM



The only thing I can think of is that this is being set


DTSPump.DataPumpTransformWriteFile.AppendIfFileExi sts



"khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote

Quote:
I created the package several months ago so I am not aware of any options
I
chose to append to the text file rather then overwrite it. I would not
have
chosen such an option if I were aware of it. As for copying the file away
to
another location I am not aware of how to do this in a DTS package. Any

ideas? Is there a way of changing the DTS package so that text files are

overwritten? I have looked and I have been unable to find such an option

within the DTS package properties.


"Allan Mitchell" wrote:

How have you created the package?
What options did you choose.
By default a text file would overwrite.

You could easily before the DataPump happens copy the last file away
somewhere. DTS will generate a new one.

Allan


"khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message
news:khan_salim (AT) discussions (DOT) microsoft.com:
Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text file
defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is
appended

with new data so the text file grows larger and larger each time it
is
run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder for
1
day.

I am not a VB programmer so any VB solutions need to be simple and
well
explained. Is it possible to implement a solution in DTS without
VB?

Thanks,




Reply With Quote
  #5  
Old   
khan_salim
 
Posts: n/a

Default Re: Need to overwrite text file, not append to file in DTS package - 02-24-2005 , 03:17 PM



Where do I check in the DTS package to see if this is being set? I've
checked 'disconnect edit' and I could not find any reference to this.

"Allan Mitchell" wrote:

Quote:
The only thing I can think of is that this is being set


DTSPump.DataPumpTransformWriteFile.AppendIfFileExi sts



"khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote in message
news:khansalim (AT) discussions (DOT) microsoft.com:
I created the package several months ago so I am not aware of any options
I
chose to append to the text file rather then overwrite it. I would not
have
chosen such an option if I were aware of it. As for copying the file away
to
another location I am not aware of how to do this in a DTS package. Any

ideas? Is there a way of changing the DTS package so that text files are

overwritten? I have looked and I have been unable to find such an option

within the DTS package properties.


"Allan Mitchell" wrote:

How have you created the package?
What options did you choose.
By default a text file would overwrite.

You could easily before the DataPump happens copy the last file away
somewhere. DTS will generate a new one.

Allan


"khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in message
news:khan_salim (AT) discussions (DOT) microsoft.com:
Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text file
defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is
appended

with new data so the text file grows larger and larger each time it
is
run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder for
1
day.

I am not a VB programmer so any VB solutions need to be simple and
well
explained. Is it possible to implement a solution in DTS without
VB?

Thanks,





Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Need to overwrite text file, not append to file in DTS package - 02-24-2005 , 03:38 PM



I'll have a look as I have never set this property my self either

"khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote

Quote:
Where do I check in the DTS package to see if this is being set? I've
checked 'disconnect edit' and I could not find any reference to this.

"Allan Mitchell" wrote:

The only thing I can think of is that this is being set


DTSPump.DataPumpTransformWriteFile.AppendIfFileExi sts



"khan_salim" <khansalim (AT) discussions (DOT) microsoft.com> wrote in message
news:khansalim (AT) discussions (DOT) microsoft.com:
I created the package several months ago so I am not aware of any
options
I
chose to append to the text file rather then overwrite it. I would
not
have
chosen such an option if I were aware of it. As for copying the file
away
to
another location I am not aware of how to do this in a DTS package.
Any

ideas? Is there a way of changing the DTS package so that text files
are

overwritten? I have looked and I have been unable to find such an
option

within the DTS package properties.


"Allan Mitchell" wrote:

How have you created the package?
What options did you choose.
By default a text file would overwrite.

You could easily before the DataPump happens copy the last file
away
somewhere. DTS will generate a new one.

Allan


"khan_salim" <khan_salim (AT) discussions (DOT) microsoft.com> wrote in
message
news:khan_salim (AT) discussions (DOT) microsoft.com:
Using SQL Server 2000
DTS package runs a simple query from a SQL Server table in the
'Transform data task' object and then writes results to a text
file
defined
in tab 'Destination' under 'Table name:'.

Each time the DTS package is run the text file 'filename.txt' is
appended

with new data so the text file grows larger and larger each time
it
is
run.
The DTS package is run nightly.

1. I need the file to be overwritten each time the file is run
2. If possible an archive of the file could be saved in a folder
for
1
day.

I am not a VB programmer so any VB solutions need to be simple
and
well
explained. Is it possible to implement a solution in DTS
without
VB?

Thanks,






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.