Query to extract data in a specified format
- From: S.Attaluri@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (sattaluri)
- Date: Thu, 08 Sep 2005 15:47:51 -0500
I am new to SQL and need help in extracting some data from a table.
My table has the following data --
FUND_ID BEGIN_DATE END_DATE FEES
50 19910101 19930830 0.5%
50 19930831 19980429 0.6%
50 19980430 20000228 0.7%
50 20000229 20030331 0.72%
51 19620930 19950330 1.2%
51 19950331 19990929 1.3%
51 19990930 20031230 1.25%
51 20031231 20050130 1.4%
51 20050131 20050331 1.5%
52 19960531 19971129 0.2%
52 19971130 19990530 0.25%
52 19990531 20010530 0.3%
The above dates are stored as numbers in the database.
My output should be --
FUND_ID JAN-94 FEB-94 MAR-94.....APR-01 MAY-01 JUN-01....JAN-03
FEB-03 MAR-03......JAN-05 FEB-05 MAR-05
50 (0.6/12)
(0.6/12)(0.6/12)..(0.72/12)(0.72/12)(0.72/12).(0.72/12)(0.72/12)(0.72/12)..-- -- --
51 (1.2/12)
(1.2/12)(1.2/12)..(1.25/12)(1.25/12)(1.25/12).(1.25/12)(1.25/12)(1.25/12)..(1.4/12)
(1.5/12) (1.5/12)
52 -- -- -- (0.3/12) (0.3/12) --.....-- -- -- ..
-- -- --
.
- Follow-Ups:
- RE: Query to extract data in a specified format
- From: KARL DEWEY
- RE: Query to extract data in a specified format
- Prev by Date: Re: parameterized in clause
- Next by Date: Re: Adding records to a table
- Previous by thread: Time lapsed between two records with same value
- Next by thread: RE: Query to extract data in a specified format
- Index(es):
Relevant Pages
|