Subject | Re: [firebird-support] String Concatenation with null field |
---|---|
Author | Jason Dodson |
Post date | 2006-01-09T22:02:08Z |
Uh, no.
Select Coalesce(MyField1, '') || Coalesce(MyField2, '') as MyNewField
From MyTable;
Martijn Tonies wrote:
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
Select Coalesce(MyField1, '') || Coalesce(MyField2, '') as MyNewField
From MyTable;
Martijn Tonies wrote:
>--
>> OK Martijn Tonies,
>>
>> But this is the unique form? My scripts will increase a lot in size with
>> this.
>
> Well, another way could be:
>
> select <concatenate here>
> from ...
> where mycolumn is not null
>
> union all
>
> select <column with no concatenation>
> from ...
> where mycolumn is null
>
>
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.