[dba-SQLServer] Append several fields into one

jwcolby jwcolby at colbyconsulting.com
Thu Jun 25 12:54:54 CDT 2009


Mark,

I definitely haven't gotten to writing UDFs.  Thanks for the suggestion.

John W. Colby
www.ColbyConsulting.com


Mark Breen wrote:
> Hi John,
> Great, but in your comment below, you mention printing them out.  I
> was referring more to writing your own UDF's.  It is as easy as a sproc, but
> can be used inline.  For the example you had originally posted in this
> thread, you could write a udf that would concatenate the fields you need,
> with nulls taken care of, then that udf is available throughout the db.
>  Again, I guess you now this, but if it helps, I am glad.
> 
> As Arthur mentions below, you can have a udf that returns a value, or you
> can also have one return a table.
> 
> Does any one know why you use a UDF to return a table, rather than an sproc
> ?
> 
> Mark




More information about the dba-SQLServer mailing list