Scheduled DTS package will not run..?

  • Hi!

    I'm trying to import a flat text file into an instance of SQL Server 2000 with DTS. The text file is semicolon delimited and second column is date format (smalldatetime, yyyymmdd).

    At first I just imported the file, which resulted in an error (if I didn't change the column properties in the database). Then I found some ActiveX scripts that I tried to modify to my needs, and this results in "no error" but the rows are not imported??? I should probably tell you the scripts I found were written to have the date properties in first column, so I just changed it.

    Has anyone got an idea about how to import the file.

    A single row looks like this:

    0000049;20080211;511504;3814;1006;60;1;

    Thank you!

    /Martin

  • Hi Martin,

    Try to load the file into a temporary or a stage table with a varchar datatype for the datetime column and then load into the final table with conversion of to the datetime datatype using convert(smalldatetime,column)

    Regards

    Martin

  • Cool...

    This worked just fine!

    Still can't seem to get why ActiveX scripting wouldn't do it though..?

    Thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

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