Hi Sjoerd, 

While using the concat function and || operator, if any of the operands are null, then the result becomes null. 

For example, if first name is null and last name has some value string, when I concat these two to get the full name, the full name comes as null. 

What if null would be treated as an empty character and on concatenation it would give the available operand as result? 

P.S. : I agree that we could store the empty character instead of null to get the desired result. But instead of the concat operator showing null for actual values, it could show the least available value. 




Thanks & Regards,

Vijayakrishna.P.
Mobile : (+91) 9500402305.

On Thu, Oct 29, 2015 at 5:59 PM, Sjoerd Mullender <sjoerd@acm.org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 29/10/15 10:46, Sébastien RAILLARD (PASSMAN) wrote:
> Dear all,
>
> Is there a way to concatenate more than 2 strings at once? The
> CONCAT function only allow for concatenating 2 strings.

You can use the || operator to concatenate strings, and then
concatenating more than 2 is easy:

'one' || 'two' || 'three'

> Also, hhe JDBC driver for MonetDB reports that the following string
> functions are supported (see the list below). Are these functions
> documented somewhere?
>
> ascii char_length character_length code concat copyfrom difference
>  editdistance editdistance2 get_value_for ilike index insert lcase
>  left length levenshtein like locate lower lpad ltrim
> next_value_for not_ilike not_like octet_length patindex
> qgramnormalize repeat replace restart right rpad rtrim similarity
> soundex space splitpart strings substring trim truncate ucase
> upper
>
> Best regards, Sebastien
>
>


- --
Sjoerd Mullender
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWMhEWAAoJEISMxT6LrWYgeV4H/RvyBMbA2Bv7EvVr37fTDESh
ASoijS5vAwXsAk3TPfzQ8wLYPdUNee6a7I9qaOnSI/D7FEzo0DtkLDwv/Hpqxs5z
FWplqqkD/JAGPdASQrcbPdT1Gx+3ytXxpvJ5f30NkyaTGsW/OF/yHb8p6tXk74nw
cBEA/AWbPpKqw8AloUT7PcTh3fgfp/2QoRAU2dEaxoB55vyuS26QXLmrhAITcvSU
iXkaWUtyssV6pf/v2F+ePEMUAcn8xkFWte4p5G7FejRbGjdC9c+WLrupcgskZgU5
ilaatbNy4t1OyB2JSKmOVUUZeUbX4zCvl6C5W0m+Ayl5lUa0cujDRRpoF2S7TTM=
=lbql
-----END PGP SIGNATURE-----
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list