Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Script Library
 list() UDF

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-03 : 12:07:56
Amol writes "I wish to write a UDF that will concatenate values from each row of a column for a select query. for each invocation of the UDF it should check the callee query to see if its the next row of the current query and concatenate the value or if its a new query start from null.

eg. : select list(name) from employee

will return a "single" list of all names in the employee table as a comma delimited string.

TIA, Amol."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-01-03 : 12:12:48
I wrote a fantastic article on this ...

I thought this forum was for posting scripts, not requesting them ...

Jay White
{0}
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-01-03 : 12:20:48
I goofed, I thought it had been written out as a UDF already and was posted in this forum.

...hint...hint....hint...hint...

Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-01-03 : 12:24:27
Byrmol's UDF in the comments from the article may be just what he is looking for....


- Jeff
Go to Top of Page
   

- Advertisement -