FR/FAQ/Base/117

From Apache OpenOffice Wiki
< FR‎ | FAQ‎ | Base
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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"
Personal tools