<br />
<b>Notice</b>:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>breadcrumb-navxt</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in <b>/home/devtools/public_html/blog/wp-includes/functions.php</b> on line <b>6131</b><br />
{"id":458,"date":"2013-05-15T10:44:00","date_gmt":"2013-05-15T13:44:00","guid":{"rendered":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/"},"modified":"2021-09-04T18:25:42","modified_gmt":"2021-09-04T21:25:42","slug":"concatenando-dados-no-sql-server","status":"publish","type":"post","link":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/","title":{"rendered":"Concatenando dados no SQL Server"},"content":{"rendered":"<div dir=\"ltr\">\n<p>A concatena\u00e7\u00e3o de dados \u00e9 o resultado da jun\u00e7\u00e3o de mais de uma informa\u00e7\u00e3o, que podem ou n\u00e3o estar na mesma coluna da tabela. Um exemplo pr\u00e1tico de concatena\u00e7\u00e3o que usamos em nosso dia a dia \u00e9 o telefone: DDD + N\u00famero.<\/p>\n<p>J\u00e1 abordei aqui no blog como realizar a concatena\u00e7\u00e3o em MySQL e PostgreSQL:<\/p>\n<ul>\n<li><a href=\"https:\/\/devtools.com.br\/blog\/concatenando-campos-no-mysql\/\" target=\"_blank\" rel=\"noopener noreferrer\">Concatenando campos no MySQL<\/a><\/li>\n<li><a href=\"https:\/\/devtools.com.br\/blog\/concatenando-campos-no-postgresql\/\" target=\"_blank\" rel=\"noopener noreferrer\">Concatenando campos no PostgreSQL<\/a><\/li>\n<\/ul>\n<p>No SQL Server, em especifico nas vers\u00f5es anteriores a 2012, a forma de concatena\u00e7\u00e3o \u00e9 diferente dos demais bancos de dados.<\/p>\n<p>O formato nativo do \u00e9:<\/p>\n<p><span style=\"color: blue;\"><i>select\u00a0<\/i><\/span><br \/>\n<i>\u00a0 <span style=\"color: red;\">&#8216;(&#8216;<\/span> <span style=\"color: purple;\">+<\/span> cod_area <span style=\"color: purple;\">+<\/span> <span style=\"color: red;\">&#8216;) &#8216;<\/span> + telefone<\/i><br \/>\n<span style=\"color: blue;\"><i>from<\/i><\/span><br \/>\n<i>\u00a0 clientes ;<\/i><\/p>\n<p>Como vemos, os dados s\u00e3o concatenados com aux\u00edlio do operador\u00a0+ (mais).<\/p>\n<p>J\u00e1 na vers\u00e3o 2012, o SQL Server incorporou como fun\u00e7\u00e3o nativa o Concat, assim como o MySQL e Oracle:<\/p>\n<p><span style=\"color: blue;\"><i>select<\/i><\/span><br \/>\n<i>\u00a0 <span style=\"color: magenta;\">concat<\/span>(<span style=\"color: red;\">&#8216;(&#8216;<\/span>, cod_area, <span style=\"color: red;\">&#8216;)&#8217;<\/span>, telefone)<\/i><br \/>\n<span style=\"color: blue;\"><i>from<\/i><\/span><br \/>\n<i>\u00a0 clientes ;<\/i><\/p>\n<div>\u00c9 importante se ressaltar que, a concatena\u00e7\u00e3o de tipos de dados diferentes pode causar erros no resultado do select, fique atento quanto a isto.<\/p>\n<p>Grande abra\u00e7o e at\u00e9 a pr\u00f3xima.<\/p>\n<p>Refer\u00eancias:<br \/>\n<a href=\"http:\/\/blog.sqlauthority.com\/2010\/11\/25\/sql-server-concat-function-in-sql-server-sql-concatenation\/\" target=\"_blank\" rel=\"noopener\">http:\/\/blog.sqlauthority.com\/2010\/11\/25\/sql-server-concat-function-in-sql-server-sql-concatenation\/<\/a><br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/pt-br\/library\/hh231515.aspx\" target=\"_blank\" rel=\"noopener\">http:\/\/msdn.microsoft.com\/pt-br\/library\/hh231515.aspx<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/10550307\/concat-function-in-sql-server\" target=\"_blank\" rel=\"noopener\">http:\/\/stackoverflow.com\/questions\/10550307\/concat-function-in-sql-server<\/a><\/p>\n<\/div>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A concatena\u00e7\u00e3o de dados \u00e9 o resultado da jun\u00e7\u00e3o de mais de uma informa\u00e7\u00e3o, que podem ou n\u00e3o estar na mesma coluna da tabela. Um exemplo pr\u00e1tico de concatena\u00e7\u00e3o que usamos em nosso dia a dia \u00e9 o telefone: DDD + N\u00famero. J\u00e1 abordei aqui no blog como realizar a concatena\u00e7\u00e3o em MySQL e PostgreSQL: &#8230; <a title=\"Concatenando dados no SQL Server\" class=\"read-more\" href=\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\" aria-label=\"More on Concatenando dados no SQL Server\">Ler mais<\/a><\/p>\n","protected":false},"author":1,"featured_media":837,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97],"tags":[],"class_list":["post-458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Concatenando dados no SQL Server<\/title>\n<meta name=\"description\" content=\"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Concatenando dados no SQL Server\" \/>\n<meta property=\"og:description\" content=\"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Devtools\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-15T13:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-04T21:25:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png\" \/>\n\t<meta property=\"og:image:width\" content=\"466\" \/>\n\t<meta property=\"og:image:height\" content=\"383\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fabiano Abreu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabiano Abreu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\"},\"author\":{\"name\":\"Fabiano Abreu\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"headline\":\"Concatenando dados no SQL Server\",\"datePublished\":\"2013-05-15T13:44:00+00:00\",\"dateModified\":\"2021-09-04T21:25:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\"},\"wordCount\":204,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"image\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png\",\"articleSection\":[\"SQL Server\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\",\"url\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\",\"name\":\"Concatenando dados no SQL Server\",\"isPartOf\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png\",\"datePublished\":\"2013-05-15T13:44:00+00:00\",\"dateModified\":\"2021-09-04T21:25:42+00:00\",\"description\":\"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.\",\"breadcrumb\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage\",\"url\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png\",\"contentUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png\",\"width\":466,\"height\":383},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/devtools.com.br\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Concatenando dados no SQL Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#website\",\"url\":\"https:\/\/devtools.com.br\/blog\/\",\"name\":\"Devtools\",\"description\":\"Sua caixa de ferramentas online\",\"publisher\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devtools.com.br\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed\",\"name\":\"Fabiano Abreu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png\",\"contentUrl\":\"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png\",\"width\":184,\"height\":184,\"caption\":\"Fabiano Abreu\"},\"logo\":{\"@id\":\"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/devtools.com.br\/blog\"],\"url\":\"https:\/\/devtools.com.br\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Concatenando dados no SQL Server","description":"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.","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:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/","og_locale":"pt_BR","og_type":"article","og_title":"Concatenando dados no SQL Server","og_description":"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.","og_url":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/","og_site_name":"Devtools","article_published_time":"2013-05-15T13:44:00+00:00","article_modified_time":"2021-09-04T21:25:42+00:00","og_image":[{"width":466,"height":383,"url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png","type":"image\/png"}],"author":"Fabiano Abreu","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Fabiano Abreu","Est. tempo de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#article","isPartOf":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/"},"author":{"name":"Fabiano Abreu","@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"headline":"Concatenando dados no SQL Server","datePublished":"2013-05-15T13:44:00+00:00","dateModified":"2021-09-04T21:25:42+00:00","mainEntityOfPage":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/"},"wordCount":204,"commentCount":2,"publisher":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"image":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png","articleSection":["SQL Server"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/","url":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/","name":"Concatenando dados no SQL Server","isPartOf":{"@id":"https:\/\/devtools.com.br\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage"},"image":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png","datePublished":"2013-05-15T13:44:00+00:00","dateModified":"2021-09-04T21:25:42+00:00","description":"Veja como \u00e9 poss\u00edvel concatenar diferentes campos no SQL Server.","breadcrumb":{"@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#primaryimage","url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png","contentUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2013\/06\/sql-server-2008.png","width":466,"height":383},{"@type":"BreadcrumbList","@id":"https:\/\/devtools.com.br\/blog\/concatenando-dados-no-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/devtools.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"Concatenando dados no SQL Server"}]},{"@type":"WebSite","@id":"https:\/\/devtools.com.br\/blog\/#website","url":"https:\/\/devtools.com.br\/blog\/","name":"Devtools","description":"Sua caixa de ferramentas online","publisher":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devtools.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":["Person","Organization"],"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/aa3425fdfdefa404466fc49f6d122eed","name":"Fabiano Abreu","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/","url":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png","contentUrl":"https:\/\/devtools.com.br\/blog\/wp-content\/uploads\/2022\/07\/Fabiano-Abreu.png","width":184,"height":184,"caption":"Fabiano Abreu"},"logo":{"@id":"https:\/\/devtools.com.br\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/devtools.com.br\/blog"],"url":"https:\/\/devtools.com.br\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/comments?post=458"}],"version-history":[{"count":2,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions"}],"predecessor-version":[{"id":1339,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions\/1339"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/media\/837"}],"wp:attachment":[{"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/media?parent=458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/categories?post=458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devtools.com.br\/blog\/wp-json\/wp\/v2\/tags?post=458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}