terça-feira, 15 de julho de 2014

Inserir Hifen no CEP - Insert into an existing value

UPDATE yourtable
SET
  zip = CONCAT_WS('-', SUBSTR(zip, 1, 5), SUBSTR(zip, 6))
WHERE
  LENGTH(zip)=9

Nenhum comentário:

Postar um comentário

Linux bash file returns unexpected token `$'do\r''

open file in vi edit with   vi filename.sh   command; type in vi  :set ff=unix  command; save file with  :wq It will save the file with unix...