Funkce MS Access Left() .
Příklad
Extrahujte 3 znaky z řetězce (začínající zleva):
SELECT Left("SQL Tutorial", 3) AS ExtractString;
Definice a použití
Funkce Left() extrahuje určitý počet znaků z řetězce (počínaje zleva).
Poznámka: Viz také funkce Right() .
Syntax
Left(string, number_of_chars)
Hodnoty parametrů
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 |
Technické údaje
Pracuje v: | Od Access 2000 |
---|
Další příklady
Příklad
Extrahujte 5 znaků z textu ve sloupci „Jméno zákazníka“ (začíná zleva):
SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;