Subject Re: Joining two string fields
Author Adam
--- In firebird-support@yahoogroups.com, Robert martin <rob@c...> wrote:
>
> Hi
>
> I want to return StringA || StringB. I can do this fine but would like
> a cr between the two strings so they begin on different lines (when
> printed). How do I do this?

I can imagine a number of methods, the easiest being

select 'Hello' || '
' || 'World'
from RDB$DATABASE;

Other methods are creating a stored procedure called crlf, (you can
guess what it returns).

select 'Hello' || (select str from CRLF()) || 'World'
from RDB$DATABASE;

Thirdly, you could create a UDF function called CRLF

select 'Hello' || CRLF() || 'World'
from RDB$Database;

The first way looks easiest though.

Adam