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!

round function in oracle

SuriSep 28 2015 — edited Sep 28 2015

Hi,

Database Version: Oracle 11g r2

Please find below source and target data. We use Informatica as ETL tool to load data into Oracle from different Source Systems.

Number values are rounding off to maximum length 16 while loading into Oracle.

I'm trying to achieve the same result using Oracle ROUND function but not getting the required output. Could you please throw some light on this.

Sample Data


with t

   as (select 1234.456 quantity from dual

   union all

   select 10003070.31010132 from dual

   union all

   select .00003274 from dual

   union all

   select .47377377 from dual

   union all

   select 2000000.123456789 from dual)

select *

  from t;



Required Output data(target data):

  Source Data                         Target data
  -------------                       ----------------------
  1234.456                              1234.456
  10003070.31010132                     10003070.3101013
  .00003274                            .00003274
  .47377377                            .47377377
  2000000.123456789                    2000000.12345679

Thanks,

Suri

Message was edited by: Suri Added sample data

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2015
Added on Sep 28 2015
3 comments
319 views