Friday 18 July 2014

Mini Post: Error 0xc02020a1: Data conversion failed. The data conversion for column returned status value 4

Helloooo! And welcome (or welcome back) to SQL Something!

Today's mini-post is about an error you can run into when attempting to use the Import/Export Wizard to import some data into a DB of your choice:

Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "COLUMN NAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
Fig. 1: Annoying Error.

Seems simple enough. You might have a column of data in your source file that is too long for the column in the destination file. A couple things you need to check:

  • Is your source data in fact too long for destination field?
  • Have you changed the default Output Column Width after you chose the data source?

Fig. 2: Setting the OutputColumnWidth size. You'd be surprised how easy it is for this guy to be overlooked.
  •  If you are creating a new destination table, have changed the default column size?

Fig. 3: Setting the size of the output table.

The Wizard should now run without issue.

Fig. 4: SUCCESS

DISCLAIMER: As stated, I’m not an expert so please, PLEASE feel free to politely correct or comment as you see fit. Your feedback is always welcomed. :-)

No comments:

Post a Comment