Home » SQL & PL/SQL » SQL & PL/SQL » Row into Column and sum two columns (Oracle 10 G, Windows)
Row into Column and sum two columns [message #686669] Tue, 15 November 2022 09:39
hissam78
Messages: 186
Registered: August 2011
Location: PAKISTAN
Senior Member
Dear Experts,
following is the table with insert statement and output from row into column and sum the Column A and Column B,
Some body can help please.

Output attached in CSV file



INSERT INTO ASSET_SCHEDULE ( "'COST/REVALUEDAMOUNT'", ASSET_DATE, REVALUATION_IMPAIRMENT,
ADDITIONAL_DISPOSAL, ASOFCOSTREVALAMTDEP ) VALUES ( 
'Cost/Revalued Amount',  TO_Date( '11/15/2022 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
, -6067620, 0, -6067620); 
INSERT INTO ASSET_SCHEDULE ( "'COST/REVALUEDAMOUNT'", ASSET_DATE, REVALUATION_IMPAIRMENT,
ADDITIONAL_DISPOSAL, ASOFCOSTREVALAMTDEP ) VALUES ( 
'Cost/Revalued Amount',  TO_Date( '08/13/2022 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
, 109649463, 9073731, 118723194); 
INSERT INTO ASSET_SCHEDULE ( "'COST/REVALUEDAMOUNT'", ASSET_DATE, REVALUATION_IMPAIRMENT,
ADDITIONAL_DISPOSAL, ASOFCOSTREVALAMTDEP ) VALUES ( 
'Accumulated Depreciation',  TO_Date( '11/15/2022 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
, 3713017, NULL, NULL); 
INSERT INTO ASSET_SCHEDULE ( "'COST/REVALUEDAMOUNT'", ASSET_DATE, REVALUATION_IMPAIRMENT,
ADDITIONAL_DISPOSAL, ASOFCOSTREVALAMTDEP ) VALUES ( 
'Accumulated Depreciation',  TO_Date( '08/13/2022 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
, 8693601, 4500, 8689101); 
COMMIT;
CREATE TABLE ASSET_SCHEDULE
(
  "'COST/REVALUEDAMOUNT'"  VARCHAR2(24 BYTE),
  ASSET_DATE               DATE,
  REVALUATION_IMPAIRMENT   NUMBER,
  ADDITIONAL_DISPOSAL      NUMBER,
  ASOFCOSTREVALAMTDEP      NUMBER
)



Previous Topic: Refreshing Materialized View
Next Topic: unique timestamp
Goto Forum:
  


Current Time: Wed Feb 01 12:11:14 CST 2023