Skip to Main Content

SQL & PL/SQL

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!

display one row in oracle sql

Rajesh123Jul 24 2017 — edited Jul 24 2017

Hi All,

select '12,345.40', Value1, '12,345.40' value2, 1 units , '110.42211' code from dual

union all

select '12,345.40', Value1, '12,345.40' value2, 2 units , '900.21740' code from dual

union all

select '12,345.40', Value1, '12,345.40' value2, 3 units , '110.21790' code from dual

union all

select '12,345.40', Value1, '12,345.40' value2, 4 units , '110.21180' code from dual

   

VALUE1VALUE2UNITSCODE
12345.412345.41110.42211
12345.412345.42900.2174
12345.412345.43110.2179
12345.412345.44110.2118

Expected Output

===============

   

VALUE1VALUE2UNITSCODE
12345.412345.41110.42211
2900.2174
3110.2179
4110.2118

Can you please help me on this?

I am using Version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2017
Added on Jul 24 2017
9 comments
243 views