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 |
cronid
Starting Member
26 Posts |
Posted - 2008-02-07 : 16:03:48
|
I am trying to load a table via SSIS from a text file (becdldep), which I have defined in the package as fixed width. The fourth column in my table is defined as decimal (6, 4) and the input is the six digits 246128. I get the following error message:Error: 0xC020901C at becdldep to Securities, Securities [1006]: There was an error with input column "Column 4" (1313) on input "OLE DB Destination Input" (1019). The column status returned was: "Conversion failed because the data value overflowed the specified type.".When I define the column as float the value is accepted without an error but it is seen as 246128 rather than 24.6128. I could update the column with a divide by 1,000 but is there an easier solution? |
|
Qualis
Posting Yak Master
145 Posts |
Posted - 2008-02-07 : 16:45:04
|
There is no way to specify where to put a decimal point on a flat file source.* This would be a nice feature for importing data from a mainframe etc. You will have to put a derived column in to place the decimal (either via a string insert or division - be careful with division where you have an empty column or a 0).*That I know of!! |
|
|
cronid
Starting Member
26 Posts |
Posted - 2008-02-08 : 10:27:03
|
I don't understand the problem. The scale and precision of the destination table's column should make it clear where the decimal point should go. In this example (6, 4) indicates that the decimal should be after the first 2 digits in the text file's sending field. Why isn't that understood? What am I missing? |
|
|
Qualis
Posting Yak Master
145 Posts |
Posted - 2008-02-08 : 11:42:52
|
It does not know that there is an implied decimal. All it sees is an integer. Just because the field is ######.#### doesn't mean that putting ###### will turn out like ##.####. All it sees is a number in the format of ######. |
|
|
|
|
|