September 28, 2009 06:28 PM

How SQL Server CLR and C# Can Solve a Common Problem

Need to transpose a query’s result set? The solution is cumbersome with traditional T-SQL, so give this interesting workaround a try
Rating: (0)
SQL Server Magazine
InstantDoc ID #102631
DOWNLOAD THE CODE:
102631.zip

Executive Summary:
Ever need to create temp tables with cursors in T-SQL to mimic the utility of an array? You can use the array in C# to easily provide a solution to a common need: the transposition of a query’s result set.




...

...This article is for paid Professional Members only.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

When I try to create the dll by entering the second command in a cmd window, the dll is not created and I get the following message: c:\\TransposeFolder\\Transpose.cs(78,43): error CS0103: The name 'transposedColumn' does not exist in the current context.
How can I correct for this and get this dll created?

RoyalOaks3/6/2010 10:04:45 AM


Sorry about the missing download file! That zip file is now included on the first page. Thanks for reading!

Jason Bovberg 1/7/2010 3:22:59 PM


Although the stored proc sounds interesting, you reference a download file that I don't see a link for. All I see is the source code that I have to copy and paste. You leave it up to me to do all the implementation work when it could have easily been included with the article.

asentell 10/20/2009 7:13:45 AM


You must log on before posting a comment.

Are you a new visitor? Register Here