Click here to Skip to main content
15,886,199 members
Articles / Database Development / SQL Server

Stupid CTE tricks -- string concatenation

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
7 Jan 2012CPOL 9.1K   1  
Pretty cool little trick you've made there.With the help of an analytic function, I've fixed the ordering, and as a byproduct it also scales better:WITH ranked AS ( SELECT make,model,Rank() over (PARTITION BY make ORDER BY model) Rnk FROM MakeModel ),cte...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Database Developer
Sweden Sweden
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions