Fonction MS Access Left()
Exemple
Extraire 3 caractères d'une chaîne (en partant de la gauche) :
SELECT Left("SQL Tutorial", 3) AS ExtractString;
Définition et utilisation
La fonction Left() extrait un certain nombre de caractères d'une chaîne (en commençant par la gauche).
Remarque : Voir aussi la fonction Right() .
Syntaxe
Left(string, number_of_chars)
Valeurs des paramètres
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 |
Détails techniques
Travaille dans: | Depuis Access 2000 |
---|
Plus d'exemples
Exemple
Extrayez 5 caractères du texte de la colonne "CustomerName" (en partant de la gauche) :
SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;