MySQL Forums
Forum List  »  Portuguese

Re: remover letras e zeros à esquerda
Posted by: Roberto de Bem
Date: February 05, 2026 11:30AM

Opa Hugo!

Cê pode usar a função cast como o exemplo abaixo:

MySQL > SELECT CAST(TRIM(LEADING 'F' FROM 'F00801') AS UNSIGNED) AS result;
+--------+
| result |
+--------+
| 801 |
+--------+
1 row in set (0.00 sec)

No seu caso ficaria assim:

CAST(TRIM(LEADING 'F' FROM i.external_code) AS UNSIGNED) AS Cod_Forn

Options: ReplyQuote


Subject
Views
Written By
Posted
286
February 05, 2025 05:51AM
Re: remover letras e zeros à esquerda
78
February 05, 2026 11:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.