creating a dynamic table using cursor

From: Nikhil (anonymous_at_discussions.microsoft.com)
Date: 05/11/04


Date: Tue, 11 May 2004 04:46:07 -0700

I have a table which list the purchases made from different vendors in different months... the table structure is as follows

vendorname
month
purchase

i want to have the result displayed in a table whose column heading would be

vendorname
1stMnthPurchase
2ndMnthPurchase
3rdMnthPurchase

and so on....

however i did like to have only those months where purchases have happened....
when the cursor encounters the last month....it should exit....

so for eg...in month3, the result would give me vendorwise purchase for 1st mnth, 2nd month and 3rd month only...
in month 4, it would give me vendorwise purchase for 1st,2nd,3rd and 4th month

let me know at the earliest

regards

Nikhil



Relevant Pages

  • SQL Query for unique entries and sums by group
    ... ID VendorName Parts QtyOrdered AvgPartCost ... purchases and group them by VendorName. ... ***end SQL ... What I can't seem to do is get this all into one query. ...
    (microsoft.public.access.formscoding)
  • re: totaling purchases
    ... I have written a macro that does just what you ask. ... purchases and put that in another cell. ... pain. ...
    (microsoft.public.excel.misc)