Blog Archives

Split string in Sql Server

Today I found very good solution, to split the string in Sql Server: //Sql Function CREATE FUNCTION [dbo].[Split] ( @String NVARCHAR(4000), @Delimiter NCHAR(1) ) RETURNS TABLE AS RETURN ( WITH Split(stpos,endpos) AS( SELECT 0 AS stpos, CHARINDEX(@Delimiter,@String) AS endpos UNION

Tagged with:
Posted in SQL Server
Top Rated

Error: Please make sure the Twitter account is public.

Blog Stats
  • 29,684 hits