DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
anto.vis
Participant



Joined: 07 Apr 2008
Posts: 1

Points: 14

Post Posted: Wed May 16, 2018 9:52 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Hi all,
I have a problem when I try to write into a Sql Server Db (from db2), and the datatype of target column is "money".

the log show this errror: ODBC function "SQLExecute" reported: SQLSTATE = 22018: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC SQL Server Legacy Driver]Invalid character value for cast specification (CC_OdbcDBStatement::executeInsert, file CC_OdbcDBStatement.cpp, line 731)

I tried also this: change (column_name,",",".") but in this case the job write always 0 (0,00).

My ODBC properties:
Array size: 1
Fail on size mismatch: No
Fail on type mismatch: No
Drop unmatched fields: No
Code page: Default
Fail on row error: Yes

Have you any suggestion?

Thanks and regards.
Antonio
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54221
Location: Sydney, Australia
Points: 294071

Post Posted: Sat May 19, 2018 8:03 pm Reply with quote    Back to top    

SQL Server's "money" (CURRENCY) data type is Decimal(19.4)

The reason for this, so I believe, is that Microsoft had planned to take over all world currencies and replace them with one called the Bill. Each of these would be worth so much that four decimal places are needed for sensible amounts, such as the cost of a cup of coffee (0.0002 Bills).
Laughing

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42578
Location: Denver, CO
Points: 219144

Post Posted: Sun May 20, 2018 7:53 am Reply with quote    Back to top    

Ladies and Gentlemen, Ray Wurlod!
<smattering of applause>

Antonio,

What is your source datatype? Are you doing the CAST (custom insert SQL) or is that happening automatically? I for one would also like to see some of the source values, see what the data looks like that you are trying to put into this MONEY field.

_________________
-craig

I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours