gettting output puzzle in sql server

Posted by Lakn2 under Sql Server on 5/27/2011 | Points: 10 | Views : 1217 | Status : [Member] | Replies : 0
id row carpet
i have table like
id level
-- -----
1 0
2 1
3 2

i want output like using only sql query
id row carpet
-- --- ---------
1 1 X
2 1 XXX
2 2 X X
2 3 XXX
3 1 XXXXXXXXX
3 2 X XX XX X
3 3 XXXXXXXXX
3 4 XXX XXX
3 5 X X X X
3 6 XXX XXX
3 7 XXXXXXXXX
3 8 X XX XX X
3 9 XXXXXXXXX

Thanks&Regards
LakshmiNarayana Nalluri.



Responses

(No response found.)

Login to post response