I am working on a DTS package that imports a text file daily. The text file that has to be imported is fixed width, however, each record in the file spans 7 lines. Each line of data has a line feed, or carriage return at the end, and I'm not really sure if each record has a record delimiter (Each record seems to be separated by a Line Feed or carriage return as well). Every record begins with an account number that begins with the same prefix (M000), so I could search for that Prefix to find the begining of the record, but I don't know how to get around the carriage returns embedded in the record. I just know that every 7th line begins a new record with a standardized prefix for the account number. I was going to try to parse the file, and maybe use substring function in sql to insert the records and fields into their appropriate tables, or maybe try bulk insert. I could use VB script, although that's not my strong suit. HELP!!
Start Free Trial