creating a dynamic table using cursor
From: Nikhil (anonymous_at_discussions.microsoft.com)
Date: 05/11/04
- Next message: Nikhil: "can a column be named as a variable?"
- Previous message: MUSTAFA: "Re: Third largest salary"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Nikhil: "can a column be named as a variable?"
- Previous message: MUSTAFA: "Re: Third largest salary"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|