copy cvs file to sql

  • I have a csv file as my source and my a sql 2005 table as my destination.

    The problem i am having is that when the transform runs it does the first 600 rows and then throws up the following error

    "Invalid character value for cast specification"

    After investigation I have found that it fails then a row has Null values .

    Has anybody have a code snipit to or a idea on how to get round the problem.

    I forgot to mention in between the source and destination there is a data conversion transformation to covert the text values into decimals

  • You could put a Derived Column transform ahead of your Data Conversion. Use a Conditional Expression to change the empty string to a zero. Since this value is coming in from a CSV text file, it would be an empty string (""), not a NULL value.

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

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