Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Query that will count consecutively??????

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
I have created a crosstab query that calculates to total purchases made from a supplier<br><br>Here's the SQL statement:<br><br>TRANSFORM Sum([Supplier Purchases].[PO Total]) AS [SumOfPO Total]<br>SELECT [Supplier Purchases].[Supplier Number]<br>FROM [Supplier Purchases]<br>GROUP BY [Supplier Purchases].[Supplier Number]<br>PIVOT Format([PO Date],&quot;mmm-yyyy&quot;) In (&quot;Jan-2000&quot;,&quot;Feb-2000&quot;,&quot;Mar-2000&quot;,&quot;Apr-2000&quot;,&quot;May-2000&quot;,&quot;Jun-2000&quot;,&quot;Jul-2000&quot;,&quot;Aug-2000&quot;,&quot;Sep-2000&quot;,&quot;Oct-2000&quot;,&quot;Nov-2000&quot;,&quot;Dec-2000&quot;);<br><br>My question is, can the year (&quot;yyyy&quot;) automatically roll-over to 2001 on if the [PO Date] is in 2001??????<br><br>Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top