Problem with UNION and numeric fields

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc

Poston Fri, 27 Jun 2008 2:16 pm

Guys, I'm having a problem aqui ...
Following ...

I'm doing a UNION between two select statements, only q in my two select statements is returned a numeric value, when done select each separately, the result comes out, but when done with union is truncated the numeric value.
Example: select from dual union select 1.67 1.69 from dual if I do these two selects below separately, a returns and another 1.67 1.69, if I do a union, will return 1 and 1.
How do you get around this??? And why does this happen?

Location: São Paulo


Poston Fri, 27 Jun 2008 3:40 pm

Brother, what tool are you using to perform this query?
I auditioned in SQL * Plus with the code below:
Code: Select all
SELECT  1.69  FROM dual
SELECT 1.55  FROM dual
and called me back ok.
If in any specific tool, try using conversion functions like To_Char to accomplish the formatting.

Anything, send it to us.
Location: Araraquara - SP


OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional

Return to SQL

Who is online

Users browsing this forum: No registered users and 4 guests