{"id":81,"date":"2014-04-29T09:16:00","date_gmt":"2014-04-29T12:16:00","guid":{"rendered":"http:\/\/helbertt.16mb.com\/site\/index.php\/2014\/04\/29\/removendo-espacos-no-inicio-e-fim-de-uma-string\/"},"modified":"2014-04-29T09:16:00","modified_gmt":"2014-04-29T12:16:00","slug":"removendo-espacos-no-inicio-e-fim-de-uma-string","status":"publish","type":"post","link":"https:\/\/helbertt.xyz\/site\/removendo-espacos-no-inicio-e-fim-de-uma-string\/","title":{"rendered":"Removendo espa\u00e7os no in\u00edcio e fim de uma string."},"content":{"rendered":"<p>Dica boba<\/p>\n<p>Acontece muito quando se importa dados de uma planilha alguns dados apresentarem espa\u00e7os no in\u00edcio ou no fim da string. Para remover \u00e9 f\u00e1cil, basta executar esta query:<\/p>\n<p><b>UPDATE tabela set campo = trim(campo);<\/b><\/p>\n<p>Agora caso queira remover somente espa\u00e7os da direta ou da esquerda \u00e9 s\u00f3 executar:<\/p>\n<p><i>Lado esquerdo:<\/i><br \/><b>UPDATE tabela SET campo = LTRIM(campo);<\/b><\/p>\n<p><i>Lado direito:<\/i><br \/><b>UPDATE tabela SET campo = RTRIM(campo);<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dica boba Acontece muito quando se importa dados de uma planilha alguns dados apresentarem espa\u00e7os no in\u00edcio ou no fim<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout"},"categories":[70],"tags":[],"_links":{"self":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts\/81"}],"collection":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helbertt.xyz\/site\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}