Select distinct code,Cast((Select top 1 pts_value from TAB Where
TAB.code=t.code) as varchar)+','+
cast((Select top 1 pts_value from TAB where code=t.code and pts_value not in
(Select top 1 pts_value from TAB Where TAB.code=t.code)) as varchar)+','+
Cast((Select top 1 pts_value from TAB where code=t.code and pts_value not in
(Select top 2 pts_value from TAB Where TAB.code=t.code)) as varchar) as
pts_value
from TAB t
TAB is as table name
Hope this will help you.
Cheers !!
Papak
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/