Subject RE: [firebird-support] CR/LF in SQL
Author Thomas Steinmaurer
Christian,

> I would like to do the following Delphi code sample in SQL:
>
> NameAll := Name1 + #13#10 + Name2;
>
> I guess that in SQL it must be something like:
>
> NameAll = Name1 || ??? || Name2
>
> My problem is that I do not know how CR/LF is represented in
> SQL.

As Helen said, the general solution is using an UDF.

If you need something like that in a trigger or stored
procedure without using an UDF, then you could give the
following a try.

For example:


CREATE PROCEDURE PRO_CRLF (
FIRSTNAME VarChar(20),
LASTNAME VarChar(40))
AS
declare variable fullname varchar(60);
begin
fullname = firstname || '
' || lastname;
// ...
end
^^


Regards,
Thomas Steinmaurer
LogManager Serie - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com