ifnull
Danny Lewkin
daniel.lewkin at cognosis.be
Tue Jul 8 08:18:47 CDT 2008
Hi Ivan,
On 07 Jul 2008, at 16:05, Ivan Smahin wrote:
> 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?
>
Yes, it is ok to have NULL values, some typelists are created by
organisations, and some are fixed by default, so they're for all
organisations.
Guess we could solve this by creating a dummy organisation, but I will
try your tip first, and experiment with the query in a cursor and see
what comes out...
Greetz,
Danny
> --
> Best regards,
> Ivan Smahin
> Senior Software Engineer
> Paradigma Software, Inc
> Valentina - The Ultra-Fast Database
> http://www.valentina-db.com
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list