{"id":30434,"date":"2024-03-01T06:38:00","date_gmt":"2024-03-01T05:38:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=30434"},"modified":"2024-03-04T13:23:05","modified_gmt":"2024-03-04T12:23:05","slug":"dividir-texto-com-separador-com-o-sql-server-string-split","status":"publish","type":"post","link":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/","title":{"rendered":"Dividir Texto com Separador com o SQL Server STRING_SPLIT"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\" id=\"h-a-funcionalidade-de-dividir-texto-em-diferentes-linhas-com-base-num-separador-esta-disponivel-nativamente-a-partir-do-sql-server-2016\">A funcionalidade de dividir texto em diferentes linhas com base num separador est\u00e1 dispon\u00edvel nativamente a partir do SQL Server 2016.<\/h4>\n\n\n\n<p>Para dividir texto com separador em linhas com o SQL Server, utilizei <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/t-sql\/functions\/string-split-transact-sql?view=sql-server-ver15\" target=\"_blank\" rel=\"noreferrer noopener\">fun\u00e7\u00f5es definidas pelo utilizador T-SQL<\/a> durante anos antes do lan\u00e7amento do STRING_SPLIT na vers\u00e3o 2016. De facto, a partir do <strong>SQL Server 2016<\/strong>, uma nova fun\u00e7\u00e3o integrada permite esta funcionalidade. \u00c9 a fun\u00e7\u00e3o <strong>T-SQL STRING_SPLIT<\/strong>.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#1-dividir-texto-com-valores-separados-por-virgulas-em-sql-server\" >1. Dividir texto com valores separados por v\u00edrgulas em SQL Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#2-analisar-texto-com-separador-de-ponto-e-virgula-em-linhas-com-o-sql-server\" >2. Analisar texto com separador de ponto e v\u00edrgula em linhas com o SQL Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#3-dividir-texto-de-variavel-em-multiplas-linhas\" >3. Dividir texto de vari\u00e1vel em m\u00faltiplas linhas<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-1-dividir-texto-com-valores-separados-por-virgulas-em-sql-server\"><span class=\"ez-toc-section\" id=\"1-dividir-texto-com-valores-separados-por-virgulas-em-sql-server\"><\/span>1. Dividir texto com valores separados por v\u00edrgulas em SQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Para este primeiro exemplo, um caso de uso comum para STRING_SPLIT \u00e9 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/split\" target=\"_blank\" rel=\"noreferrer noopener\">dividir<\/a> uma string de valores separados por v\u00edrgulas (CSV) em linhas individuais.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT value\nFROM STRING_SPLIT('Apple,Orange,Banana,Grapes,Mango', ','); \n\n-- Use o segundo exemplo para renomear a coluna\nSELECT value as Fruit\nFROM STRING_SPLIT('Apple,Orange,Banana,Grapes,Mango', ','); \n<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"600\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2024\/03\/split-text-separator-in-lines-sql-server-string-split.jpg\" alt=\"Dividir Texto com Separador em Linhas com a fun\u00e7\u00e3o SQL Server STRING_SPLIT\" class=\"wp-image-30422\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2024\/03\/split-text-separator-in-lines-sql-server-string-split.jpg 680w, https:\/\/expert-only.com\/wp-content\/uploads\/2024\/03\/split-text-separator-in-lines-sql-server-string-split-300x265.jpg 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><figcaption class=\"wp-element-caption\"><em>Dividir Texto com Separador em Linhas com a fun\u00e7\u00e3o SQL Server STRING_SPLIT<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-analisar-texto-com-separador-de-ponto-e-virgula-em-linhas-com-o-sql-server\"><span class=\"ez-toc-section\" id=\"2-analisar-texto-com-separador-de-ponto-e-virgula-em-linhas-com-o-sql-server\"><\/span>2. Analisar texto com separador de ponto e v\u00edrgula em linhas com o SQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Outra aplica\u00e7\u00e3o pr\u00e1tica \u00e9 dividir uma string de emails separados por ponto e v\u00edrgula em linhas individuais.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT value as [Email]\nFROM STRING_SPLIT('example1@email.com;example2@email.com;example3@email.com', ';')<\/pre>\n\n\n\n<p>Isso retornar\u00e1 uma tabela onde cada linha cont\u00e9m um \u00fanico endere\u00e7o de email da string original.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3-dividir-texto-de-variavel-em-multiplas-linhas\"><\/span>3. Dividir texto de vari\u00e1vel em m\u00faltiplas linhas<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Ent\u00e3o, neste terceiro exemplo, utilizamos cidades. O objetivo \u00e9 alcan\u00e7ar o mesmo resultado mas utilizando vari\u00e1veis para armazenar a string e o separador. O c\u00f3digo \u00e9 mais flex\u00edvel e pode lidar com dados vindos de uma tabela, por exemplo.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-- Declara\u00e7\u00e3o de vari\u00e1veis\nDECLARE \n@String nvarchar(max), \n@Separator char(1);\n\n-- Inicializa\u00e7\u00e3o da string e do Separador\nSET @String = 'New York;Los Angeles;Chicago;Houston;Phoenix;Philadelphia;San Antonio;San Diego;Dallas;San Jose';\nSET @Separator = ';';\n\n-- Utilizar o STRING_SPLIT aqui em vez da solu\u00e7\u00e3o XML\nSELECT @String = STRING_SPLIT ( @String , @Separator );\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-sobre-a-funcao-t-sql-string-split\">Sobre a Fun\u00e7\u00e3o T-SQL STRING_SPLIT<\/h3>\n\n\n\n<p>A fun\u00e7\u00e3o STRING_SPLIT no SQL Server \u00e9 uma ferramenta poderosa para manipula\u00e7\u00e3o de texto, permitindo a dividir texto com separador em linhas com o SQL Server. Seja lidando com dados CSV ou analisando strings complexas, STRING_SPLIT oferece uma solu\u00e7\u00e3o direta para converter texto delimitado em linhas separadas. Sua simplicidade e efic\u00e1cia tornam-na uma caracter\u00edstica essencial para desenvolvedores e administradores de banco de dados que lidam com processamento de texto e tarefas de transforma\u00e7\u00e3o de dados.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"h-dividir-uma-string-com-delimitadores-em-varias-colunas\">Dividir uma string com delimitadores em v\u00e1rias colunas<\/h5>\n\n\n\n<p>E se precisar armazenar cada valor numa coluna separada, por exemplo, para preparar a <a href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\">importa\u00e7\u00e3o de ficheiros csv com cabe\u00e7alho<\/a>? Aqui est\u00e1 outro tutorial com um exemplo de como selecionar cada valor da vari\u00e1vel @String em colunas dedicadas separadas.<\/p>\n\n\n\n<p><strong>Tutorial completo sobre como <a style=\"font-weight: bold;\" href=\"https:\/\/expert-only.com\/en\/t-sql\/split-text-into-columns-sql-server\/\">Dividir texto delimitado em colunas no SQL Server<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-tutoriais-sql-e-ti wp-block-embed-tutoriais-sql-e-ti\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"4zh9k0SoA5\"><a href=\"https:\/\/expert-only.com\/en\/t-sql\/split-text-into-columns-sql-server\/\">Split delimited text into columns in SQL Server<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Split delimited text into columns in SQL Server&#8221; &#8212; Tutoriais SQL e TI\" src=\"https:\/\/expert-only.com\/en\/t-sql\/split-text-into-columns-sql-server\/embed\/#?secret=KHRwrZflUz#?secret=4zh9k0SoA5\" data-secret=\"4zh9k0SoA5\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>A funcionalidade de dividir texto em diferentes linhas com base num separador est\u00e1 dispon\u00edvel nativamente a partir do SQL Server 2016. Para dividir texto com separador em linhas com o SQL Server, utilizei fun\u00e7\u00f5es definidas pelo utilizador T-SQL durante <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\" title=\"Dividir Texto com Separador com o SQL Server STRING_SPLIT\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10815,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[456],"tags":[],"class_list":{"0":"post-30434","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-t-sql"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Dividir Texto com Separador com o SQL Server STRING_SPLIT<\/title>\n<meta name=\"description\" content=\"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dividir Texto com Separador com o SQL Server STRING_SPLIT\" \/>\n<meta property=\"og:description\" content=\"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutoriais SQL e TI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-01T05:38:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-04T12:23:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Dividir Texto com Separador com o SQL Server STRING_SPLIT\",\"datePublished\":\"2024-03-01T05:38:00+00:00\",\"dateModified\":\"2024-03-04T12:23:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\"},\"wordCount\":393,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg\",\"articleSection\":[\"T-SQL\"],\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\",\"url\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\",\"name\":\"Dividir Texto com Separador com o SQL Server STRING_SPLIT\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg\",\"datePublished\":\"2024-03-01T05:38:00+00:00\",\"dateModified\":\"2024-03-04T12:23:05+00:00\",\"description\":\"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"pt\",\"item\":\"https:\/\/expert-only.com\/pt-pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dividir Texto com Separador com o SQL Server STRING_SPLIT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#website\",\"url\":\"https:\/\/expert-only.com\/pt-pt\/\",\"name\":\"Tutoriais SQL e TI\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/pt-pt\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/pt-pt\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dividir Texto com Separador com o SQL Server STRING_SPLIT","description":"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.","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:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/","og_locale":"pt_PT","og_type":"article","og_title":"Dividir Texto com Separador com o SQL Server STRING_SPLIT","og_description":"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.","og_url":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/","og_site_name":"Tutoriais SQL e TI","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2024-03-01T05:38:00+00:00","article_modified_time":"2024-03-04T12:23:05+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Escrito por":"Expert-Only","Tempo estimado de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Dividir Texto com Separador com o SQL Server STRING_SPLIT","datePublished":"2024-03-01T05:38:00+00:00","dateModified":"2024-03-04T12:23:05+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/"},"wordCount":393,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/pt-pt\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg","articleSection":["T-SQL"],"inLanguage":"pt-PT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/","url":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/","name":"Dividir Texto com Separador com o SQL Server STRING_SPLIT","isPartOf":{"@id":"https:\/\/expert-only.com\/pt-pt\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg","datePublished":"2024-03-01T05:38:00+00:00","dateModified":"2024-03-04T12:23:05+00:00","description":"Para dividir o texto com separador em linhas com o SQL Server 2016 e vers\u00f5es posteriores, utilize a fun\u00e7\u00e3o STRING_SPLIT em T-SQL.","breadcrumb":{"@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/"]}]},{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pencils-CDFB9498B85_1920x1080.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/pt-pt\/t-sql\/dividir-texto-com-separador-com-o-sql-server-string-split\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"pt","item":"https:\/\/expert-only.com\/pt-pt\/"},{"@type":"ListItem","position":2,"name":"Dividir Texto com Separador com o SQL Server STRING_SPLIT"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/pt-pt\/#website","url":"https:\/\/expert-only.com\/pt-pt\/","name":"Tutoriais SQL e TI","description":"","publisher":{"@id":"https:\/\/expert-only.com\/pt-pt\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/pt-pt\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/pt-pt\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/pt-pt\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/expert-only.com\/pt-pt\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/pt-pt\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/expert-only.com\/pt-pt\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/posts\/30434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/comments?post=30434"}],"version-history":[{"count":1,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/posts\/30434\/revisions"}],"predecessor-version":[{"id":30445,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/posts\/30434\/revisions\/30445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/media\/10815"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/media?parent=30434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/categories?post=30434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/pt-pt\/wp-json\/wp\/v2\/tags?post=30434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}