Reading file based on first caracter
Posted on 2006-05-23
Hello All -
I'm writing an program in VB Script (MS SQL Server 2000, DST ActiveX) that needs to open a file, read line by line and base on the first caracter save the whole line based on the first caracter, which works as a record indicator. I should have a total of 3 record types on that master file and the master file will have multiple records per record type.
Also, I have to preserve the length of the line, as I'll then load those 3 files to 3 different SQL tables afterwards.
This is how I'm thinking on how to attack on this:
If first caracter = 1, then save record to C:\1.txt
If first caracter = 2, then save record to C:\2.txt
If first caracter = 3, then save record to C:\3.txt
Thanks in advance for the help.