Subject How to add CRLF to VARCHAR column
Author Jarrod Hollingworth
I have a stored proc which needs to take a few address fields (street, city,
state, postal code) and concatenate them in such a way as to have different
parts appear on different lines, separated by carriage return + linefeed
pairs, so that they appear in a "memo" type field as they would on an
envelope. The stored proc returns them in a VARCHAR column.

How can I add CRLF separators? Does it depend on the character encoding?

I cannot rely on UDF functions nor re-formatting in client app code. Ideally
I need a solution that will work both in Firebird and Interbase.

One trick that a colleague came up with was:

DECLARE VARIABLE CRLF CHAR(2);
BEGIN
CRLF = '
';

/* Use CRLF */

END

Is that an "as designed" solution that is likely to be supported in future?

Regards,

Jarrod Hollingworth

++ Q1: Where do you spend your time?
++ Q2: Are your projects profitable?
++ Q3: Are you billing your customers accurately?
++ A : Complete Time Tracking
++ Track your time EASILY and ACCURATELY
++ http://www.complete-time-tracking.com