Skip to Content
0
Mar 04, 2009 at 02:07 PM

total

102 Views

Hi Experts,

I would like to calculate the total of some transactions of journal entry in the past until selected period.

It is a year to date data.

I use table OJDT, JDT1, OFPR, OPRJ and OACP.

So, the field OFPR.code is a condition.

E.g.

select sum....from OJDT ... JDT ... OFPR ... OACP ... where ofpr.code = '[%0]' group by OPRJ.prjname

so, if I select 2007-02 in the code, I would like to have the sum of transaction doctotal until that priod e.g if the OACP.year = year(getdate()) I also put in the condition result in 2007 then in the query result, the doctotal is a sum of period 2007-01 and 2007-02.

Pls give advice. I really desperate about it. I appreciate it so much

Steve