ifnull
Ivan Smahin
ivan_smahin at paradigmasoft.com
Mon Jul 7 09:05:17 CDT 2008
Hello Danny,
Monday, July 7, 2008, 4:37:47 PM, you wrote:
> Hi Ruslan,
> it's inserted as a method, and yes it's set to be unique.
> We use this technique all the time, if we want something unique for
> example for a company. Like a loginname and password, that should be
> unique...
> We never had problems with that before...
> Greetz,
> Danny
> On 07 Jul 2008, at 15:20, Ruslan Zasukhin wrote:
>> On 7/7/08 12:28 PM, "Danny Lewkin" <daniel.lewkin at cognosis.be> wrote:
>>
>> Hi Danny,
>>
>>> Hi List,
>>>
>>> because a concat function returns NULL if one of the fields is null,
>>> I thought I could solve this bij :
>>>
>>> concat(displayname,objptr_typelist,ifnull(objptr_parentid,' '))
>>>
>>> in which I would add a space instead.
>>>
>>> But I still keep getting a error on inserting duplicate rows, and I'm
>>> certain that objptr_typelist is NOT NULL and has not the same value
>>> somewhere else already...
>>
Well, could you try just select result into cursor?
SELECT concat(displayname,objptr_typelist,ifnull(objptr_parentid,'
')) FROM ....
Is it ok or there are some NULL values?
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list