[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

SQL -Reply



Excuse my short-hand, but I don't want to retype everything...

begin-procedure FIRST
select
a.stuff
b.stuff
c.stuff
c.merchandise_amt
     do SECOND

from A_Table A, B_Table B, C_Table C
where A joins with B joins with C
end-select
end-procedure


begin-procedure SECOND
select
sum(amt_invoiced) &invoice_amt
from PS_VCHR_IN_PO
where stuff
group by stuff
end-select
     let #Variable = &C.Merchandise_Amt - &invoice_amt
end-procedure