SQL Language (MOSC)

MOSC Banner

how to subtract a specific row from another row in a sql statement ?

edited Nov 24, 2013 10:28PM in SQL Language (MOSC) 6 commentsAnswered ✓
  Hello Experts,

i have 2 queries combined with union all 
and there is a outer main select statement that add and subtract from a 2 inner queries - find attached query statement in "my sql query" file -

I have attached the output of the query in an Excel file within 2 tabs.

 1st tab: named " query union all " that displays the output without the outer select statement

  2nd tab: named "query combined" that displays the output with the outer select statement
 
if we look at the second tab in the excel file my target is to diplay data as showed
    
    as subract   200.87 from 40159.23 and put the result in amount_cr_usd column

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center