I have the following example table structure:
PolicyNumber CaptureDate DemandText SubDemandText
------------------------- ----------------------- ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
TK91019744 2009-08-13 14:10:00 I want to change my policy details Defering retirement
1467338UG 2010-06-07 15:35:00 I want a value CFV/NPR/PR/No of Units Held/Bid Price
1467338UG 2010-06-07 15:35:00 I want With Profit/MVR information What is it?/Does it apply?/How much?
1467338UG 2010-06-07 15:35:00 I want With Profit/MVR information Bonus Rates/Amounts (Regular/Final/Special)
1516678UX 2010-06-08 15:23:00 Chase - Payments/Money Orientated Death Claim
1563576UX 2010-06-10 10:03:00 I want policy / contract information What is the policy no
1563576UX 2010-06-10 10:03:00 I want policy / contract information Policy Type
1563576UX 2010-06-10 10:03:00 I want a value FV, SV, MVR, Units, Bid Price, Final Bonus
1563576UX 2010-06-10 10:03:00 I want policy / contract information Initial Investment/Policy Start Date
1563576UX 2010-06-10 10:04:00 I want fund information MVR guarantee
1601369UJ 2010-04-23 10:34:00 I want a value FV, SV, MVR, Units, Bid Price, Final Bonus
1601369UJ 2010-04-23 10:35:00 I want policy / contract information Withdrawals / History
1630285UJ 2010-04-12 15:54:00 I want a value FV, SV, MVR, Units, Bid Price, Final Bonus
1630285UJ 2010-04-12 15:55:00 I want policy / contract information Withdrawals / History
Now for some reason a customer wants the data in the following format for a report:
PolicyNumber CaptureDate DemandText SubDemandText CaptureDate DemandText SubDemandText CaptureDate DemandText SubDemandText
------------ ----------- ---------- ------------- ----------- ---------- ------------- ----------- ---------- -------------
Pivotted data but they want the CaptureDate, DemandText and SubDemandText repeated for each line across in columns so the first demand is first then the next and so on. I hope I have explained this well enough. If I haven't give me a shout.