Null and concat
Thorsten Hohage
thohage at objectmanufactur.com
Fri Oct 5 07:38:05 CDT 2007
Hi Bart,
On 2007-10-05, at 14:03, Bart Pietercil wrote:
> SELECT CONCAT('Va’, NULL, ‘na’);
>
> crashes VStudio
no - I got a "unexpected token NULL"
> SELECT CONCAT('Va’, NULL)
> I get unexpected token NULL.
same here and IMHO this is ok, because NOBODY would type a constant
NULL in a concat statement.
BUT
when I do
select concat(name,'-',firstname,'-',company) from visitors where
city like '%burg%'
and there is a row with name = null and firstname = null I would
expect reading the wiki, that I'll get "NULL" as result, but I get "--
objectmanufactur" now while this is fine in many situations to handle
NULL as an empty string in string operations, the wiki tells
something different.
Furthermore I then expect that NULL are always handled as empty
string in any string operation.
regards
Thorsten Hohage
--
objectmanufactur.com - Hamburg,Germany
More information about the Valentina
mailing list