,Thanks for the intuitive article Converting Rows to Columns – PIVOT. I'd like know if the aspect, 'Bringing Dynamism to the PIVOT' can be really applied as a Stored Procedure. Thanks
Jun 16, 2015 at 04:15 PM
DO you have a link to the article you are referring to?
Yes, thanks. This is the link to the article: http://mobile.databasejournal.com/features/mssql/converting-rows-to-columns-pivot-and-columns-to-rows-unpivot-in-sql-server.html
I much prefer cross tabs and their dynamic counterpart to PIVOT. I find the syntax far less obtuse and there is even a slight performance benefit. http://www.sqlservercentral.com/articles/T-SQL/63681/ and the dynamic version http://www.sqlservercentral.com/articles/Crosstab/65048/
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
Need long-form SQL discussion? SQLserverCentral.com is the place.
asked: Jun 16, 2015 at 04:15 PM
Seen: 417 times
Last Updated: Jun 17, 2015 at 08:56 PM
row as column in ms sql 2005
Syntax error when creating a stored procedure with multiple PIVOTs
SQL Server 2008 and DB2 Stored procedures
Easy way to manage full database name in stored procedures and triggers?
can we provide output parameters and return statement to a SP at a time?
sum of fields from 2 different views
scalar variable declaration
Is there a way to change the columns to rows in a stored procedure?
How is best to persuade someone that stored procedures can outperform ORMs?
Stored Procedures - Urgent Help Needed