Função MS Access Left()
Exemplo
Extraia 3 caracteres de uma string (começando da esquerda):
SELECT Left("SQL Tutorial", 3) AS ExtractString;
Definição e uso
A função Left() extrai um número de caracteres de uma string (começando da esquerda).
Nota: Veja também a função Right() .
Sintaxe
Left(string, number_of_chars)
Valores de parâmetro
Parameter | Description |
---|---|
string | Required. The string to extract from |
number_of_chars | Required. The number of characters to extract. If this parameter is higher than the number of characters in string, this function will return the entire string |
Detalhes técnicos
Trabalha em: | Do Acesso 2000 |
---|
Mais exemplos
Exemplo
Extraia 5 caracteres do texto na coluna "CustomerName" (começando da esquerda):
SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;