Subject | RE: [ib-support] Problem with Varchars and null |
---|---|
Author | Galante Hernan (SFA) |
Post date | 2002-01-23T13:16:37Z |
Daniel,
> > The problem is Ab.Name in some cases is null .... and for myWhere I can read this?
> >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.
>
> >Can I resolve this?I will Try with a UDF, Thanks for your comments.
>
> Yes.
>
> >How?
>
> 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)
>
>