data conversion problem
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Assuming that you are referring to "Invalid Number" error, how do you expect to store the string "39368,39399,39429"into a numeric field ?
It must be a Varchar field with atleast 18 chars length long.
If you want the target to be numeric, you must pick one of the 3 values or derive a new numeric value.
It must be a Varchar field with atleast 18 chars length long.
If you want the target to be numeric, you must pick one of the 3 values or derive a new numeric value.
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
No. We're either missing some vital piece of information or you're not doing what you are telling us you are doing. Or both.
Read the field as a string. Move it through the job as a string. Send it to a string field (VARCHAR2) in Oracle. Doing that there is no way you'll get an "invalid number" error back from the database.
![Confused :?](./images/smilies/icon_confused.gif)
Read the field as a string. Move it through the job as a string. Send it to a string field (VARCHAR2) in Oracle. Doing that there is no way you'll get an "invalid number" error back from the database.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Hi hemaarvind,
This kind of issues i have faced earlier also, you can solve it using the steps given below:-
1) specify the delimter as "," and quote as "none" at the format tab.
2) The field which is having this issue, go to it's field level properties by double clicking on the column.Then specify the delimter as "," and quote as "double"
This will resolve your issue definitely.
Regards
datisaq
This kind of issues i have faced earlier also, you can solve it using the steps given below:-
1) specify the delimter as "," and quote as "none" at the format tab.
2) The field which is having this issue, go to it's field level properties by double clicking on the column.Then specify the delimter as "," and quote as "double"
This will resolve your issue definitely.
Regards
datisaq
IBM Certified - Information Server 8.1
They don't seem to be having any issues actually reading the value from the file, the disconnect seems to be in how they expect to store that in the target table. Even though it has been stated multiple times here already, I'll go through it one more time.
* If you want to store "39368,39399,39429" just like it looks, commas and all - you need to be targeting a VARCHAR2 field in Oracle and pass it through your job as a string.
* If you want to store as a single number, your only choice here is to remove the commas and then use StringToDecimal() to convert it to 393683939939429 and store it in a NUMBER field in Oracle. One with at least a precision of 15.
* If you want to store "39368,39399,39429" just like it looks, commas and all - you need to be targeting a VARCHAR2 field in Oracle and pass it through your job as a string.
* If you want to store as a single number, your only choice here is to remove the commas and then use StringToDecimal() to convert it to 393683939939429 and store it in a NUMBER field in Oracle. One with at least a precision of 15.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
-
- Participant
- Posts: 148
- Joined: Thu Apr 10, 2008 12:47 am