August 27, 2008 at 12:20 am
hi, my table contain the following values
no name
1 aaa
1 bbb
1 ccc
2 vvv
2 nnn
i need output as following ( max no.of cols is 5 )
no col1 col2 col3 col4 col5
1 aaa bbb ccc null null
2 vvv nnn null null null
please give me some inputs.
August 27, 2008 at 1:16 am
Have a look at this article by Jeff Moden:
August 28, 2008 at 12:57 am
Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply