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!

distributing values according percentage column

muttleychessApr 14 2015 — edited Apr 14 2015

Hi

I have a  table below ( there is other columns)

CREATE TABLE MYTABLE(
NUM_PARCELA   NUMBER(3),
VL_PARCELA    NUMBER(19,2),
SEQ_CALCULO   NUMBER(15) ,
VL_FISCAL     NUMBER(19,2),
PERC_VALOR_NF NUMBER)

this table is populated incorrectly,
I have data such as
SQL> with mytable as (
  2  SELECT 1    PARCEL_NUMBER,  -2849.33       PARCEL_VALUE ,  3653595 ID   ,   7501.50 FICAL_VALUE, 50 PERCENTUAL FROM DUAL UNION ALL
  3  SELECT 1    PARCEL_NUMBER,  7152.67        PARCEL_VALUE ,  3653597 ID   ,   7501.50 FICAL_VALUE, 50 PERCENTUAL FROM DUAL )
  4  SELECT *
  5     FROM MYTABLE;

PARCEL_NUMBER PARCEL_VALUE         ID FICAL_VALUE PERCENTUAL
------------- ------------ ---------- ----------- ----------
            1     -2849,33    3653595      7501,5         50
            1      7152,67    3653597      7501,5         50

I must to update in columns PARCEL_VALUE  and

This post has been answered by Jarkko Turpeinen on Apr 14 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2015
Added on Apr 14 2015
7 comments
330 views