Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[base SQL] concatenate with empty fields?

The following SQL-code is working, but not for entry's with empty fields. If the field 'voorvoegsel' (dutch for prefix last name) is empty, there's no result. Other entry's are shown. If i use only the title (aanhef) and first name (voornaam) every entry is shown.

How can i get results when one field is empty?

SELECT 
"contacten"."Aanhef" ||' '|| "contacten"."Voornaam" ||' '|| "contacten"."Voorvoegsel" ||' '|| "contacten"."Achternaam" 
AS 
"volledigenaam" 
FROM "contacten" 
ORDER BY "contacten"."Voornaam" ASC