May 12, 2009 at 6:44 am
i have values 1124015359 as string .
i want to convert as int data type by Data conversion transformation in SSIS. i used the eight digit single integer as a convert data type.but i got error. how to resolve this ???
[Data Conversion [897]] Error: The "output column "Copy of Column7" (3397)" failed because error code 0xC020907F occurred, and the error row disposition on "output column "Copy of Column7" (3397)" specifies failure on error. An error occurred on the specified object of the specified component.
May 12, 2009 at 6:56 am
are you sure you only have numeric integer values in that column?
try running the following SQL with the column and table names changed to match your schema:
select isnumeric(replace(columnname,'.','z')), count(*)
from tablename
group by columnname
May 12, 2009 at 7:21 am
hi,
thanx for reply.
i have only integer value in the flat file.
some of the records haev empty value also ..
May 12, 2009 at 7:39 am
change the error settings on the data transformation to re-direct the rows in case of an error. Send these error rows to a table or flat file and then this will show which rows are causing the problem..
May 12, 2009 at 7:40 am
it could well be the empty values which are causing the error
use the data conversion to convert these to a 0(zero)
May 12, 2009 at 8:21 am
hi,
i created a new variable(scope:package) 'xx' as string with value of 2
i can get the values in script component. when i convert that as interger, it wil give the error .
[Data Conversion [897]] Error: Data conversion failed while converting column "xx" (2828) to column "Copy of xx" (2871). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
one more thing.
even if i convert as string "xx" i can t get the value as "2" . it will give "0"
May 12, 2009 at 8:39 am
I used this data:
123435
1124015359
1234
1
2
3
4
and created a new derived column using the following:
([Column 0] == "" ? "0" : [Column 0])
and it worked fine
May 12, 2009 at 8:46 am
Samuel Vella (5/12/2009)
I used this data:123435
1124015359
1234
1
2
3
4
and created a new derived column using the following:
([Column 0] == "" ? "0" : [Column 0])
and it worked fine
be careful with this sort of conversion as you are assuming that an empty (possiblu Null) value equals 0, when 0 may have a business meaning that is different from Null.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy