variable select list in a cursor
From: Tansel Ozkan <tansel_at_openix.com>
Date: 1996/11/17
Message-ID: <328F9359.3F2C_at_openix.com>#1/1
2)
CURSOR mycursor is
Date: 1996/11/17
Message-ID: <328F9359.3F2C_at_openix.com>#1/1
Is there any way one can have a variable list of fields in a cursor?
e.g.
company table have these fields:
company_name, revenue_jan,revenue_feb .... revenue_dec;
1)
CURSOR mycursor is
SELECT revenue_mar,revenue_apr FROM company WHERE company_name = 'AT&T';
2)
CURSOR mycursor is
SELECT revenue_sep,revenue_oct FROM company WHERE company_name = 'AT&T';
I want to be able to define one cursor and specify the fields corresponding to different months. If you look at the above example, I want to be able to open the cursor 'mycursor' with any field combination I want ( revenue_mar, revenue-apr or revenue_sep, revenue-oct)
If the answer is no, suggestions on how else I could achieve this would be greatly appreciated...
God bless your programs :-)
Tansel Received on Sun Nov 17 1996 - 00:00:00 CET