Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Peter Larsson Pivot table for Microsoft SQL Server RE: Pivot table for Microsoft SQL Server
Mike Dougherty
Ten Centuries
Points: 1112
More actions
June 12, 2006 at 5:54 am
#643045
Have you considered building the update string inside the loop, but executing it after you have iterated all the columns? O(1) < O(n)
Also, do you have any comments/caveats on the security implication of dynamic SQL used in this process?