Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to determine INT and FLOAT in a DECODE statement

156612Feb 6 2002 — edited May 8 2007
Can anyone help me with the following problem:

I have a column defined as a NUMBER(15,4). I am trying to determine the java type using the getScale() method in ResultSetMetaData. When the scale is greater than 0, then it is an float, else it is an int. In this case, the getScale() method should return 4. However, when querying with a DECODE statement on the NUMBER(15,4) field, the getScale() method always returns 0 and the value is therefore converted to an int. Anyone knows how to solve this problem?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2007
Added on Feb 6 2002
2 comments
1,209 views