> Consider avoiding t-SQL for such tasks primarily because it is the wrong
> tool for the job. SQL has little to do with data represented or retrieved in
[quoted text clipped - 3 lines]
> programming language to loop through the rows and create the display format
> you need.
Unless of course you just happen to live in a country with laws that
regulate such matters as audit trails on financial data.
Take it out of the database, into Excel no doubt, and you have destroyed
any nuance of accountability.
The proper place for data is in the database.
The proper place for cross-tabulation is in a reporting tool.

Signature
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
mr.mcgoo@gmail.com - 27 Feb 2008 05:33 GMT
> > Consider avoiding t-SQL for such tasks primarily because it is the wrong
> > tool for the job. SQL has little to do with data represented or retrieved in
[quoted text clipped - 17 lines]
> University of Washington
> damor...@x.washington.edu (replace x with u to respond)
Hi Daniel,
I think you misunderstoodd Anith's point. Anith meant that you should
use something else to access the data directly from the database and
loop through each relevant record generating a display as needed. For
example ASP.Net, C#, VB.Net can all access SQL directly through ADO
but you can code to present the data any way you want - not something
you can necessarily do in T-SQL. Not to export data then manipulate
the data which is how I believe you have read the suggestion.
Cheers
Chris