{"id":313,"date":"2023-11-07T08:56:09","date_gmt":"2023-11-07T08:56:09","guid":{"rendered":"https:\/\/kourentzes.com\/konstantinos\/?p=313"},"modified":"2023-11-07T08:56:10","modified_gmt":"2023-11-07T08:56:10","slug":"string_split-equivalent-udf-for-t-sql-pre-130","status":"publish","type":"post","link":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/","title":{"rendered":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130)"},"content":{"rendered":"\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#212121\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"CREATE FUNCTION dbo.fn_StringSplit\n(\n    @InputString NVARCHAR(MAX),\n    @Separator CHAR(1)\n)\nRETURNS @Result TABLE(Value NVARCHAR(MAX))\nAS\nBEGIN\n    DECLARE @StartPosition INT, @EndPosition INT\n\n    SET @StartPosition = 1\n    SET @EndPosition = CHARINDEX(@Separator, @InputString)\n\n    WHILE @StartPosition &lt; LEN(@InputString) + 1 BEGIN\n        IF @EndPosition = 0 \n            SET @EndPosition = LEN(@InputString) + 1\n        \n        INSERT INTO @Result (Value) \n        VALUES(LTRIM(RTRIM(SUBSTRING(@InputString, @StartPosition, @EndPosition - @StartPosition))))\n\n        SET @StartPosition = @EndPosition + 1\n        SET @EndPosition = CHARINDEX(@Separator, @InputString, @StartPosition)\n\n        IF @StartPosition &gt; LEN(@InputString)\n            BREAK\n    END\n\n    RETURN\nEND\nGO\n\" style=\"color:#EEFFFF;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-darker\" style=\"background-color: #212121\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F78C6C\">CREATE<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">FUNCTION<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">dbo<\/span><span style=\"color: #EEFFFF\">.fn_StringSplit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    @InputString <\/span><span style=\"color: #F78C6C\">NVARCHAR<\/span><span style=\"color: #EEFFFF\">(MAX),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    @Separator <\/span><span style=\"color: #C792EA\">CHAR<\/span><span style=\"color: #EEFFFF\">(<\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #EEFFFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F78C6C\">RETURNS<\/span><span style=\"color: #EEFFFF\"> @Result <\/span><span style=\"color: #F78C6C\">TABLE<\/span><span style=\"color: #EEFFFF\">(<\/span><span style=\"color: #F78C6C\">Value<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">NVARCHAR<\/span><span style=\"color: #EEFFFF\">(MAX))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F78C6C\">AS<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F78C6C\">BEGIN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">DECLARE<\/span><span style=\"color: #EEFFFF\"> @StartPosition <\/span><span style=\"color: #C792EA\">INT<\/span><span style=\"color: #EEFFFF\">, @EndPosition <\/span><span style=\"color: #C792EA\">INT<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">SET<\/span><span style=\"color: #EEFFFF\"> @StartPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">SET<\/span><span style=\"color: #EEFFFF\"> @EndPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">CHARINDEX<\/span><span style=\"color: #EEFFFF\">(@Separator, @InputString)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">WHILE<\/span><span style=\"color: #EEFFFF\"> @StartPosition <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">LEN<\/span><span style=\"color: #EEFFFF\">(@InputString) <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">BEGIN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">IF<\/span><span style=\"color: #EEFFFF\"> @EndPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">0<\/span><span style=\"color: #EEFFFF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">            <\/span><span style=\"color: #F78C6C\">SET<\/span><span style=\"color: #EEFFFF\"> @EndPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">LEN<\/span><span style=\"color: #EEFFFF\">(@InputString) <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">INSERT INTO<\/span><span style=\"color: #EEFFFF\"> @Result (<\/span><span style=\"color: #F78C6C\">Value<\/span><span style=\"color: #EEFFFF\">) <\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">VALUES<\/span><span style=\"color: #EEFFFF\">(<\/span><span style=\"color: #82AAFF\">LTRIM<\/span><span style=\"color: #EEFFFF\">(<\/span><span style=\"color: #82AAFF\">RTRIM<\/span><span style=\"color: #EEFFFF\">(<\/span><span style=\"color: #82AAFF\">SUBSTRING<\/span><span style=\"color: #EEFFFF\">(@InputString, @StartPosition, @EndPosition <\/span><span style=\"color: #89DDFF\">-<\/span><span style=\"color: #EEFFFF\"> @StartPosition))))<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">SET<\/span><span style=\"color: #EEFFFF\"> @StartPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> @EndPosition <\/span><span style=\"color: #89DDFF\">+<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #F78C6C\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">SET<\/span><span style=\"color: #EEFFFF\"> @EndPosition <\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">CHARINDEX<\/span><span style=\"color: #EEFFFF\">(@Separator, @InputString, @StartPosition)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">        <\/span><span style=\"color: #F78C6C\">IF<\/span><span style=\"color: #EEFFFF\"> @StartPosition <\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #EEFFFF\"> <\/span><span style=\"color: #82AAFF\">LEN<\/span><span style=\"color: #EEFFFF\">(@InputString)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">            <\/span><span style=\"color: #F78C6C\">BREAK<\/span><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">END<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #EEFFFF\">    <\/span><span style=\"color: #F78C6C\">RETURN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F78C6C\">END<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F78C6C\">GO<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Equivalent UDF for T-SQL (pre 130) STRING_SPLIT()<\/p>\n","protected":false},"author":1,"featured_media":151,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[45,43,52,42,96,95],"class_list":["post-313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-snipperts","tag-ms-sql-2","tag-sql","tag-string_split","tag-t-sql","tag-table-function","tag-udf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com\" \/>\n<meta property=\"og:description\" content=\"Equivalent UDF for T-SQL (pre 130) STRING_SPLIT()\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/\" \/>\n<meta property=\"og:site_name\" content=\"konstantinos.kourentzes.com\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-07T08:56:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-07T08:56:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Konstantinos Kourentzes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@kkourentzes\" \/>\n<meta name=\"twitter:site\" content=\"@kkourentzes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Konstantinos Kourentzes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/\"},\"author\":{\"name\":\"Konstantinos Kourentzes\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"headline\":\"STRING_SPLIT() equivalent UDF for T-SQL (pre 130)\",\"datePublished\":\"2023-11-07T08:56:09+00:00\",\"dateModified\":\"2023-11-07T08:56:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/\"},\"wordCount\":7,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"image\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png\",\"keywords\":[\"ms sql\",\"sql\",\"string_split\",\"t-sql\",\"Table function\",\"UDF\"],\"articleSection\":[\"Code Snippets\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/\",\"name\":\"STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png\",\"datePublished\":\"2023-11-07T08:56:09+00:00\",\"dateModified\":\"2023-11-07T08:56:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png\",\"contentUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/2023\\\/11\\\/07\\\/string_split-equivalent-udf-for-t-sql-pre-130\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STRING_SPLIT() equivalent UDF for T-SQL (pre 130)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#website\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/\",\"name\":\"kourentzes.com\\\/konstantinos\",\"description\":\"Konstantinos Kourentzes\",\"publisher\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/#\\\/schema\\\/person\\\/2693fb0ad7f7638a020431ffe372c822\",\"name\":\"Konstantinos Kourentzes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"contentUrl\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\",\"width\":2835,\"height\":2268,\"caption\":\"Konstantinos Kourentzes\"},\"logo\":{\"@id\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/kko.png\"},\"description\":\"Konstantinos Kourentzes is a distinguished technologist and Enterprise Resource Planning (ERP) consultant renowned for his expertise in delivering cutting-edge technology solutions. Based in Marousi, Greece, he has a knack for seamlessly integrating data-driven systems, empowering businesses to streamline their operations and achieve peak efficiency. A fervent proponent of innovation, Konstantinos is committed to instigating revolutionary shifts within organizations. His approach revolves around delivering custom-tailored ERP solutions that seamlessly align with each business's distinctive requirements. This catalyzes enduring collaborations rooted in unwavering trust and tangible outcomes. With a background rooted in technology and a passion for optimizing business processes, Konstantinos is your go-to partner for harnessing the power of ERP systems to unlock operational excellence. Connect with Konstantinos on LinkedIn to explore how his technological insights can drive your business to new heights.\",\"sameAs\":[\"https:\\\/\\\/kourentzes.com\\\/konstantinos\",\"https:\\\/\\\/x.com\\\/kkourentzes\"],\"url\":\"https:\\\/\\\/kourentzes.com\\\/konstantinos\\\/index.php\\\/author\\\/administrator\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/","og_locale":"en_US","og_type":"article","og_title":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com","og_description":"Equivalent UDF for T-SQL (pre 130) STRING_SPLIT()","og_url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/","og_site_name":"konstantinos.kourentzes.com","article_published_time":"2023-11-07T08:56:09+00:00","article_modified_time":"2023-11-07T08:56:10+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png","type":"image\/png"}],"author":"Konstantinos Kourentzes","twitter_card":"summary_large_image","twitter_creator":"@kkourentzes","twitter_site":"@kkourentzes","twitter_misc":{"Written by":"Konstantinos Kourentzes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#article","isPartOf":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/"},"author":{"name":"Konstantinos Kourentzes","@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"headline":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130)","datePublished":"2023-11-07T08:56:09+00:00","dateModified":"2023-11-07T08:56:10+00:00","mainEntityOfPage":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/"},"wordCount":7,"commentCount":0,"publisher":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"image":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#primaryimage"},"thumbnailUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png","keywords":["ms sql","sql","string_split","t-sql","Table function","UDF"],"articleSection":["Code Snippets"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/","url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/","name":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130) - konstantinos.kourentzes.com","isPartOf":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#primaryimage"},"image":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#primaryimage"},"thumbnailUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png","datePublished":"2023-11-07T08:56:09+00:00","dateModified":"2023-11-07T08:56:10+00:00","breadcrumb":{"@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#primaryimage","url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png","contentUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2023\/08\/emperor_kk_JS_function_e187f5b0-0184-4d8f-b1fc-37a21fa35fd5.png","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/kourentzes.com\/konstantinos\/index.php\/2023\/11\/07\/string_split-equivalent-udf-for-t-sql-pre-130\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kourentzes.com\/konstantinos\/"},{"@type":"ListItem","position":2,"name":"STRING_SPLIT() equivalent UDF for T-SQL (pre 130)"}]},{"@type":"WebSite","@id":"https:\/\/kourentzes.com\/konstantinos\/#website","url":"https:\/\/kourentzes.com\/konstantinos\/","name":"kourentzes.com\/konstantinos","description":"Konstantinos Kourentzes","publisher":{"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kourentzes.com\/konstantinos\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/kourentzes.com\/konstantinos\/#\/schema\/person\/2693fb0ad7f7638a020431ffe372c822","name":"Konstantinos Kourentzes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","url":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","contentUrl":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png","width":2835,"height":2268,"caption":"Konstantinos Kourentzes"},"logo":{"@id":"https:\/\/kourentzes.com\/konstantinos\/wp-content\/uploads\/2022\/02\/kko.png"},"description":"Konstantinos Kourentzes is a distinguished technologist and Enterprise Resource Planning (ERP) consultant renowned for his expertise in delivering cutting-edge technology solutions. Based in Marousi, Greece, he has a knack for seamlessly integrating data-driven systems, empowering businesses to streamline their operations and achieve peak efficiency. A fervent proponent of innovation, Konstantinos is committed to instigating revolutionary shifts within organizations. His approach revolves around delivering custom-tailored ERP solutions that seamlessly align with each business's distinctive requirements. This catalyzes enduring collaborations rooted in unwavering trust and tangible outcomes. With a background rooted in technology and a passion for optimizing business processes, Konstantinos is your go-to partner for harnessing the power of ERP systems to unlock operational excellence. Connect with Konstantinos on LinkedIn to explore how his technological insights can drive your business to new heights.","sameAs":["https:\/\/kourentzes.com\/konstantinos","https:\/\/x.com\/kkourentzes"],"url":"https:\/\/kourentzes.com\/konstantinos\/index.php\/author\/administrator\/"}]}},"_links":{"self":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":1,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/posts\/313\/revisions\/314"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/media\/151"}],"wp:attachment":[{"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kourentzes.com\/konstantinos\/index.php\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}