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!

calculation log decrement and increment in sql

suman amaraFeb 4 2021

Hi Team

I have 3 tables Quote Table, Deman Table, Output Table as the screen below
Quote Table have quty with quote ,ran, date and when Deman Table hav qty to minus the Quote table and get the output
of the output table.
create table quote_t (
quote_id number,
qyt number,
rank number,
date date
);

create table deman_t (
quote_id number,
qyt number,
date date
);

create table output_t (
quote_id number,
qyt number,
rank number,
date date
);

insert into quote_t values(123,10,1,'01-02-21');
insert into quote_t values(123,20,2,'01-02-21');
insert into quote_t values(123,20,1,'22-02-21');
insert into quote_t values(123,40,2,'22-02-21');
insert into quote_t values(123,20,3,'22-02-21');

insert into deman_t values(123,10,'01-02-21');
insert into deman_t values(123,-40,'22-02-21');

Capture222.JPG

Comments
Post Details
Added on Feb 4 2021
8 comments
417 views