cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric SQL Query 12.2 vs 12.1

former_member1170711
Participant
0 Kudos

Hello,

I have noticed that if I have an SQL query that returns a value from an Oracle table that has a column of type Number the result looks different in 12.2 than the same query did in 12.1. Basically if I click the Test button in the Workbench and choose HTML output I see the number in integer format from 12.1 but in 12.2 I see the same number with two decimal places shown.

Example: 12.1Output: "46" 12.2 output "46.00"

This causes a lot of things in our application code to break in 12.2. For example, if I have a query like this that is tied to an iBrowser, I want the drop-down to show integers and it no longer does.

I can get around this in individual cases by using the "to_char(columnNameHere)" approach in the query, however, I would have to do this in a lot of places so I would like to avoid that approach if possible. Is there a global solution to this issue?

Thanks,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Kudos

Hi Michael,

Take a look at the number format setting in the SQL Query. By default, it is usually set to 2 decimal places.

Regards,

Mike

former_member1170711
Participant
0 Kudos

Hi Mike,

Good call. That did the trick.

It is interesting that this setting was apparently ignored in 12.1. It is also interesting that this is in the query template. This seems like more of a display template setting kind of thing.

Thanks for your help.

-Mike

Answers (0)