Home Forums SQL Server 2008 SQL Server 2008 - General un split in sql RE: un split in sql
Ron McCullough
SSC Guru
Points: 63877
More actions
October 7, 2012 at 6:04 am
#1546486
Is this what you require ?
DECLARE @String VARCHAR(8000),@Delimiter CHAR(1)
SET @Delimiter = '-'
SET @String = 'A-ab-xx-y-vv-w w-'
select @String, REPLACE(@String,@Delimiter,',')
Result:
(Orinial) (Replaced)
A-ab-xx-y-vv-w w- A,ab,xx,y,vv,w w,
If everything seems to be going well, you have obviously overlooked something.
RonPlease help us, help you -before posting a question please read[/url]Before posting a performance problem please read[/url]