cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC: Convert string to NUMERIC

Former Member
0 Kudos

Hi,

I have to update a database table and so far all fields works find during SQL Update. Only a DB-field type numeric doesn't work. On XI I have a string value.

How should I convert it? Any helps welcome.

THX

Matt

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

since you use decimal places also, change that field to <b>Double</b> in XI and use.I had a similar situation where a numeric field was not at all retreived when i did a JDBC lookup. Hope this solves your problem.

Former Member
0 Kudos

Hi,

Use a user-defined java function and convert the String field to Numeric field in ur message mapping.

Try this out.

Regards,

Venkataramanan.

Former Member
0 Kudos

Hi Matt,

You better use Numeric field either integer or Long Or double in XI to avoid these confusions..:)

cheers,

Sundararamaprasad.

Former Member
0 Kudos

You can get the error from work directory on the server.

Get the sql error, it could be db specific.

I believe there should be no data conversion needed if your inbound interface also defined as xml:float.

Former Member
0 Kudos

Matthias,

What error does it give or what was the updated data in that numeric field?

regards,

Felix

Former Member
0 Kudos

Hi Felix,

thx for your quick response... no error I just get no acknowledgement back until I deactivate this field. After deactivation it runs...

Its a 10 digit character and the numeric on DB - side its also 10 digit + decimal places.

THX

Matt

Former Member
0 Kudos

Matthias,

Does it work for other numeric fields?

regards,

Felix