Welcome to EMC Consulting Blogs Sign in | Join | Help

SSIS Junkie

SSIS: But it used to work in DTS (4) - Implicitly Converting Between Data Types

Here is the next in my series of posts explaining how common tasks in DTS can now be implemented in SSIS.


Implicitly converting between data types

In DTS it was possible to implicitly cast values from one type to another. While this seemed like a useful "feature" it was actually fraught with complications as all DTS would do was basically guess how it should do the conversion - this could result in erroneous conversions where data accuracy was compromised.

A common example of implicitly convertion is going from unicode to non-unicode. In DTS this conversion would not raise any errors but it could cause a far greater problem of data inaccuracy which might not be noticed until a much later date.

SSIS makes no such provisions for implicit conversions. Instead, SSIS will (depending on the severity) raise warnings or errors if an implicit conversion is attempted. This is both a help and a hinderance. A help because it reduces the possibility of producing inaccurate data. A hinderance because it means you, as a SSIS developer, have more work to do.

A common complaint of SSIS is that the import wizard in SQL Server Management Studio is no longer as effective because it doesn't work as well as it used to. Often this is because the import wizard does not know how to convert between one data type and another. Most commonly again, the example given before about conversion from unicode to non-unicode is cited.

 

 

Published 30 June 2006 12:06 by jamie.thomson

Comments

 

Jamie Thomson - SSIS Jibber Jabber said:

I've said on numerous occasions, in slightly different ways, that making the move from DTS to SSIS...
July 11, 2006 08:43
 

SSIS Junkie said:

I've said on numerous occasions, in slightly different ways, that making the move from DTS to SSIS

December 21, 2006 19:34
 

SSIS Junkie said:

I've said on numerous occasions, in slightly different ways, that making the move from DTS to SSIS

January 15, 2007 22:36
 

priya said:

i need help in copying dat from text from sql table.

i have a flat file with comma seperated value and its data type is string [DT_STR][50](as shown in the flat file data source) and i am trying to copy it to the SQL table of data type nvarchar(256).

i have used  the data conversion task and converted it from DT_STR(50) to DT_WSTR(256).

but this is giving me error as

Error: 0xC02020A1 at Data Flow Task, Flat File Source [1]: Data conversion failed. The data conversion for column "XXX" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Error: 0xC020902A at Data Flow Task, Flat File Source [1]: The "output column "XXX" (130)" failed because truncation occurred, and the truncation row disposition on "output column "world_watch_text" (130)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

can you please help me to solve this

thank you

priya

m.priyahere@gmail.com

May 8, 2008 15:58
 

Shen said:

I have the same problem:0xC02020A1 at Data Flow Task, Flat File Source [1]: Data conversion failed. The data conversion for column "XXX" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Have you solved it?

I need help with it.

thanks

October 15, 2008 18:11
New Comments to this post are disabled

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems