Funkcja MS Access Left ()
Przykład
Wyodrębnij 3 znaki z ciągu (zaczynając od lewej):
SELECT Left("SQL Tutorial", 3) AS ExtractString;
Definicja i użycie
Funkcja Left() wyodrębnia liczbę znaków z ciągu (począwszy od lewej).
Uwaga: Zobacz także funkcję Right() .
Składnia
Left(string, number_of_chars)
Wartości parametrów
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 |
Szczegóły techniczne
Pracuje w: | Z programu Access 2000 |
---|
Więcej przykładów
Przykład
Wyodrębnij 5 znaków z tekstu w kolumnie „Nazwa klienta” (od lewej):
SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;