Daily cumul by column (1 Viewer)

hboisteau

Registered User.
Local time
Today, 16:35
Joined
Jun 5, 2012
Messages
14
Hello,
with the help of the forum I already have several things realize this request below.


Code:
SELECT Format([Date],"mm-dd") AS Jour, Sum(IIf(Year([Date])=2009,[Somme De Coin In Mad],0)) AS [Coin In Mad 2009], Sum(IIf(Year([Date])=2010,[Somme De Coin In Mad],0)) AS [Coin In Mad 2010], Sum(IIf(Year([Date])=2011,[Somme De Coin In Mad],0)) AS [Coin In Mad 2011], Sum(IIf(Year([Date])=2012,[Somme De Coin In Mad],0)) AS [Coin In Mad 2012], Sum(IIf(Year([Date])=2013,[Somme De Coin In Mad],0)) AS [Coin In Mad 2013]
FROM R_Resulat_journalier
GROUP BY Format([Date],"mm-dd")
ORDER BY Format([Date],"mm-dd");

today I still need help to complete the request. Indeed particularly eager to make a combination of days, but each column. Add to January 1, 2010 to January 2, 2010 and so on and this for all years.
Again thank you for your help.
HB
 

Guus2005

AWF VIP
Local time
Today, 17:35
Joined
Jun 26, 2007
Messages
2,642
Please rephrase the question.
What must the output look like?

Another point:
If you use a group by and immediate ifs (iif) in the same query it will get unreadable very fast.
My advice to you is that you create a query with the iifs and create a group by query based on this new query where you sum all the fields you want.

HTH:D
 

Users who are viewing this thread

Top Bottom