Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bondwiththebest
Starting Member
46 Posts |
Posted - 2009-03-02 : 11:39:44
|
Hi all, I used a dt_str data type to read "length"(in meters) from file. Below it i used a derived col. and used an expression like "(DT_I4)length *1000 < 9144 *1000 ", to get value in mm and to get values less than 9144 meters.It works fine but some times when the length is an abnormal values such as "4247478525.25". it craps out saying that""There was an error with input column "Length" (13019) on input "OLE DB Destination Input" (12815). The column status returned was: "The value could not be converted because of a potential loss of data.". ""I tried different data types such as DT_I8, DT_numeirc. is there any work around to this problem???? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-02 : 13:09:33
|
if the cause is bad data, you need to cleanse out the source to handle and remove such bad data. you can use conditional split task to process only valid data and redirect error rows to some table or flat file which can later be cleansed and then processed |
 |
|
bondwiththebest
Starting Member
46 Posts |
Posted - 2009-03-02 : 13:32:37
|
It still gives me the same error. It couldnt cast properly. I used the same condition. "(DT_I4)length *1000 < 9144 *1000 "Is there anything I could Try. |
 |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-02 : 22:33:09
|
Check if you can use something like this.http://blogs.conchango.com/jamiethomson/archive/2005/08/08/1969.aspx |
 |
|
bondwiththebest
Starting Member
46 Posts |
Posted - 2009-03-03 : 09:16:36
|
thank you but I used the wrong casting, used a dt_I8 cast and it worked for me. |
 |
|
|
|
|