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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 formatting string

Author  Topic 

MM
Starting Member

2 Posts

Posted - 2002-04-15 : 12:34:49
How can I format the string test1,test2,test3

into 'test1' , 'test2', 'test3' ?

Thanks

dsdeming

479 Posts

Posted - 2002-04-15 : 12:59:06
select '''' + REPLACE( 'test1,test2,test3', ',', ''',''' ) + ''''

Kind of ugly, but ii does what you need.

Go to Top of Page
   

- Advertisement -