Subject RE: [ib-support] Problem with Varchars and null
Author Galante Hernan (SFA)
Daniel,

> > The problem is Ab.Name in some cases is null .... and for my
> >surprise all the operation of concatenating is null. Why? In other
> databases
> >the result is Ab.Surname || ', '. This is a bug?
>
> This is not a bug. As per SQL-92 standards, this is how a concatenation
> of
> strings works.
>
Where I can read this?

> >Can I resolve this?
>
> Yes.
>
> >How?
>
I will Try with a UDF, Thanks for your comments.

> By using a Stored Procedure or a UDF to concatenate the string fields.
> You
> would have something like this:
>
> FullName = Ab.Surname;
> if Ab.Name is not null then
> FullName = FullName || ', ' || Ab.Name;
>
> This is just an example of just how part the Stored Procedure would be
> written.
>
> I use this type of Stored Procedure all the time and it works great. You
> simply have to make it the way you want it to function.
>
> Hope this helps.
>
>
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.accramed.ca)
>
>