sql replace coma seperated string


I have a string like this:

000014000608,000014000609,000014000610,000014000611

From this string i want to  remove 00001 with '' because this is a prefix of my every coma separated value.




 REPLACE((SUBSTRING(m_rx_nos,6,LEN(CAST(m_rx_nos AS VARCHAR(500)))-6)),(',0000'+ CONVERT(VARCHAR(100),f.pharminfoid_FK)),',') as m_rx_nos  

 Out Put:

4000608,4000609,4000610,400061

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

mvc razor textboxfor change event change another textboxfor value

ASP.NET MVC razor SAP Crystal report