Mr Hookom
First of all a big thank you for your advices.
I would like to ask you something in the same query but more complex....
The table now looks
Date Profit1 Insert1 Profit2 Insert2 SumField3_d_SumField2
1/1/2006 1 2 1 2
1/2/2006 4 5 4 5
1/3/2006 7 8 7 8
1/4/2006 9 10 9 10
1/5/2006 11 12 11 12
1/6/2006 13 14 13 14
The query results will be something like (according with the above table)
Date Day_Sum_Prof Day_Sum_Ins Per_Cent Prof_1
Ins_1 % Prof_2 Ins_2 %
1/1/2006 1+1 2+2 (2+2)
/
(1+1) 1 2 2/1 according the
1/2/2006 4+4 5+5 (5+5)
/ (4+4) 1+4 2+5 (2+5)/(1+4) above table
1/3/2006 7+7 8+8 (8+8)
/ (7+7) 1+4+7 2+5+8 ........ and the
1/4/2006 9+9 10+10 (10+10) /
(9+9)
previous
1/5/2006 11+11 12+12 (12+12) /
(11+11)
columns
1/6/2006 13+13 14+14 (14+14) /
(13+13)
Is it possible to help me????
Thank you in advance
Christos
Duane said:
I tried my same exact SQL with your field names and got a display of:
Date Profit Insert SumField3_d_SumField2
1/1/2006 1 2 2
1/2/2006 4 5 1.4
1/3/2006 7 8 1.25
1/4/2006 1 2 1.30769230769231
1/5/2006 4 5 1.29411764705882
1/6/2006 7 8 1.25
This is the SQL with your field names.
SELECT tblLooks.[Date], tblLooks.[Profit],
tblLooks.[Insert],
(SELECT Sum([Insert])
FROM tblLooks L
WHERE L.[Date]<=tblLooks.[Date]) /
(SELECT Sum(Profit)
FROM tblLooks L
WHERE L.[Date]<=tblLooks.[Date]) AS SumField3_d_SumField2
FROM tblLooks;
The exact table looks
Date Profit Insert Temp
[quoted text clipped - 20 lines]
Can you help me with this???