Avatar of chokka
chokka
Flag for United States of America

asked on 

SQL String parsing and fetching certain value

I have a string which i have to parse and retrieve the bill id fields. My string can have either one bill id or multiple bill id's.



Declare @str nvarchar(1000)

set @Str = 'Process of submitting the bill id: AS12345 is send back to Customer. Bill id:WE23456 and Bill id: AS12345 came from customers'

Declare @t table (billid varchar(100))
Insert into @t values ('AS12345'),('WE23456'),('AS12345')

select distinct billid from @t

Open in new window

Microsoft SQL ServerMicrosoft SQL Server 2005Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Chris Luttrell

8/22/2022 - Mon