Difference between revisions of "FR/FAQ/Base/117"
From Apache OpenOffice Wiki
(Ajout possibilité avec CHAR()) |
m |
||
Line 15: | Line 15: | ||
"Prenom" + CHAR( 32 ) + "Nom" | "Prenom" + CHAR( 32 ) + "Nom" | ||
+ | |||
+ | |||
+ | [[Category: FR/Documentation/FAQ/Base]] |
Latest revision as of 16:10, 28 October 2009
Quels codes SQL utiliser pour concaténer deux champs ?
Soit une Base avec une Table Animateurs contenant, outre un champ pour la clé primaire, un champ Nom et un champ Prenom.
La requête de concaténation de ces deux champs peut être réalisée de trois façons.
Les solutions testées pour HSQLDB :
CONCAT( "Animateurs"."Prenom" || ' ' || "Animateurs"."Nom" )
CONCAT( CONCAT( "Animateurs"."Prenom", ' ' ), "Animateurs"."Nom" )
"Prenom" + SPACE( 1 ) + "Nom"
"Prenom" + CHAR( 32 ) + "Nom"