Counting Records from TXT File

Last Post 07 Dec 2006 02:44 PM by redpoint_13. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
GoodFella3993
New Member
New Member

--
06 Dec 2006 07:23 AM
I have a DTS Job that creates a TXT File. I will then email the file along with a message of how many records are in the file. I know of a way selecting the records and inserting them into a txt file and then selecting the same records and inserting them into a table. Once in the table a simple query is used to count the records. My files are very large and I want to avoid the double step of selecting all the files twice.

Is there a way to either count the records in the created txt file or better yet, store the initial count of processed records?

Thank You,
Marc
redpoint_13
New Member
New Member

--
07 Dec 2006 02:44 PM
Or accompany every text file with another manifest file with all sorts of metadata in it (record count, crc, what you have it). Even the file name can have metadata embedded and separated with periods, like filename.<tag for date, etc>.<metadata, e.g. checksum>.txt and then get the files by name, tag and extension and parse out the metadata.

The question is does a MSFT text file store metadata and if so is it accessible by DTS tools: VBScript, PerlScript. I'd think in 2005 one could use CLR.
You are not authorized to post a reply.

Acceptable Use Policy