Comma delimitated string function

Comma delimitated string function

 

  

Hi,



Does one have a function that takes comma delimitated string and return each
string?

Example:

@p_string = 'ABD, HYTN, OPL, KUYT, NGH'



The function should able to return it as follow:

Select my_func('ABD, HYTN, OPL, KUYT, NGH')

---------------

ABD

HYTN

OPL

KUYT

NGH





Thanks,

Regsi



*********************************************************************
This electronic transmission is strictly confidential and intended solely
for the addressee. It may contain information which is covered by legal,
professional or other privilege. If you are not the intended addressee,
you must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error,
please notify the sender as soon as possible.

This footnote also confirms that this message has been swept
for computer viruses.
**********************************************************************

MS Sql Server LazyDBA home page