DTS to import not ASCI file

  • I have a text file which looks like this:

                                        XXX

    www                kkk                              kji

     

    (3 empty line)

    (empty line again)

                                        FFFFF     RRR *(*(*()

    (empty line again)

    (empty line again)

    Last Name – 45 char                         First Name(s)

    MI                               SSN                DOB

     

    RRRRRRRRRRRRRR

    3/20/03            RRRRRR  4565445

    3/20/03            RRRRRR  4565445

    3/20/03            RRRRRR  4565445

    3/20/03            RRRRRR  4565445

    End of the record with carriage return.

     Between each record there’s unknown number of empty lines – not consistent.

     The consistent element will be XXX in the beginning.

     

    For the moment I have VB6 program that reads each line and pumps it into the database, but I would like to use DTS

     

    What will be the most efficient way to be imported on a daily base?

     Any ideas will be appreciated.

    Thanks,

    MJ

  • You file needs to be clean up before using dts, for this you can create a regular expression to clean you file in vb and execute the DTS package using vb also.

    http://www.sqldts.com/default.aspx?208

    JFB

  • Currently I do not need to execute any DTS Packages from VB. My VB program puts all the data straight to a SQL table.

    My question was if there is the way to skip any type of programs and to run just a single DTS packet to read, clean and put the data into SQL table.

    Thanks,

    MJ

  • Nope... you have to create you own.

    JFB

  • Thanks a lot.

    I also could use a tool like VEdit to clean the file and then to load it with DTS.

    Thanks again.

    MJ

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply