Wednesday, March 21, 2012

Dumping incremental changes to textfile

I was wondering if there is a way to schedule a tast that will dump a
fixed width text file of all the new entries in a table. So if I had
a table with like

username - varchar(20)
created - smalldatetime

I could get a weekly feed each week of all the new users in a text
file. I know I could write a script that would go through and do this
by looking at the time stamp, and the last time that the file
previously ran and get the new dates but I was hoping there was a
built way to do this. Or perhaps a more elegant solution.

Thanks,

Charlie"charliek" <charlie_knudsen@.hotmail.com> wrote in message
news:964kpvc52gfj8mp7vf05oktlquaukcfgdm@.4ax.com...
> I was wondering if there is a way to schedule a tast that will dump a
> fixed width text file of all the new entries in a table. So if I had
> a table with like
> username - varchar(20)
> created - smalldatetime
> I could get a weekly feed each week of all the new users in a text
> file. I know I could write a script that would go through and do this
> by looking at the time stamp, and the last time that the file
> previously ran and get the new dates but I was hoping there was a
> built way to do this. Or perhaps a more elegant solution.
> Thanks,
> Charlie

Using a script is fine, or you could look at BCP or DTS as well. There's no
automatic functionality for this, so you'll have to set something up
yourself.

Simon|||On Sat, 25 Oct 2003 14:38:12 +0200, "Simon Hayes" <sql@.hayes.ch>
wrote:

>"charliek" <charlie_knudsen@.hotmail.com> wrote in message
>news:964kpvc52gfj8mp7vf05oktlquaukcfgdm@.4ax.com...
>> I was wondering if there is a way to schedule a tast that will dump a
>> fixed width text file of all the new entries in a table. So if I had
>> a table with like
>>
>> username - varchar(20)
>> created - smalldatetime
>>
>> I could get a weekly feed each week of all the new users in a text
>> file. I know I could write a script that would go through and do this
>> by looking at the time stamp, and the last time that the file
>> previously ran and get the new dates but I was hoping there was a
>> built way to do this. Or perhaps a more elegant solution.
>>
>> Thanks,
>>
>> Charlie
>Using a script is fine, or you could look at BCP or DTS as well. There's no
>automatic functionality for this, so you'll have to set something up
>yourself.
>Simon

Thanks for the info. I thought that this may be the case, however I
wanted to make sure that I was not overlooking a easy or more
efficient solution.

Thanks,

Charliesql

No comments:

Post a Comment