dbTalk Databases Forums  

Logging of rows output to a textfile

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


Discuss Logging of rows output to a textfile in the microsoft.public.sqlserver.dts forum.



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

Default Logging of rows output to a textfile - 08-04-2006 , 03:04 PM






Hello, I will be outputting the contents of a table to a file. I would like
to log, in a table, the status (failed/success) of each row. Each row has a
column with a unique number in it. This is the value I would like to output
to the logging table, along with the success or failure message.

Can someone explain how to do this? My initial thought was to do this with
an ActiveX task and the File System Object, but I am wondering if there is a
better (or easier) way. Thanks!

Ric



Reply With Quote
  #2  
Old   
Roy Harvey
 
Posts: n/a

Default Re: Logging of rows output to a textfile - 08-04-2006 , 03:18 PM






Is the status (failed/success) a column in the table? Something you
can derive from a table row?

If you can write a SELECT that returns the unique number and the
status as a two-column result set, I consider making that SELECT into
a VIEW and using DTS (if you are using SQL Server 2000) or Integration
Services (2005) to extract from the view.

Roy Harvey
Beacon Falls, CT

On Fri, 4 Aug 2006 13:04:02 -0700, Ric <Ric (AT) discussions (DOT) microsoft.com>
wrote:

Quote:
Hello, I will be outputting the contents of a table to a file. I would like
to log, in a table, the status (failed/success) of each row. Each row has a
column with a unique number in it. This is the value I would like to output
to the logging table, along with the success or failure message.

Can someone explain how to do this? My initial thought was to do this with
an ActiveX task and the File System Object, but I am wondering if there is a
better (or easier) way. Thanks!

Ric


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

Default RE: Logging of rows output to a textfile - 08-09-2006 , 10:48 AM



Sorry, place references to TableA with TextFileA.

"Ric" wrote:

Quote:
Hello, I will be outputting the contents of a table to a file. I would like
to log, in a table, the status (failed/success) of each row. Each row has a
column with a unique number in it. This is the value I would like to output
to the logging table, along with the success or failure message.

Can someone explain how to do this? My initial thought was to do this with
an ActiveX task and the File System Object, but I am wondering if there is a
better (or easier) way. Thanks!

Ric



Reply With Quote
  #4  
Old   
Ric
 
Posts: n/a

Default Re: Logging of rows output to a textfile - 08-09-2006 , 10:48 AM



No, there is no status, per se. Eseentially what I want to do is a double
insert. One insert into TableA, and another into TableB. The row being
inserted into TableB will be the same row that is being inserted into TableA
with the addition of a success/failure column that indicates if the insertion
into TableA succeeded or failed.

Ric

"Roy Harvey" wrote:

Quote:
Is the status (failed/success) a column in the table? Something you
can derive from a table row?

If you can write a SELECT that returns the unique number and the
status as a two-column result set, I consider making that SELECT into
a VIEW and using DTS (if you are using SQL Server 2000) or Integration
Services (2005) to extract from the view.

Roy Harvey
Beacon Falls, CT

On Fri, 4 Aug 2006 13:04:02 -0700, Ric <Ric (AT) discussions (DOT) microsoft.com
wrote:

Hello, I will be outputting the contents of a table to a file. I would like
to log, in a table, the status (failed/success) of each row. Each row has a
column with a unique number in it. This is the value I would like to output
to the logging table, along with the success or failure message.

Can someone explain how to do this? My initial thought was to do this with
an ActiveX task and the File System Object, but I am wondering if there is a
better (or easier) way. Thanks!

Ric



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.