Re: How to do linefeed in SQL?
Date: 1997/02/21
Message-ID: <330DFB29.71C2_at_SPAM-BLOCK-telesph.com>#1/1
greg teets wrote:
>
> This seems like it should be pretty simple but I can't see how to do
> it from the books.
>
> If you wanted to make address labels using each column as a row on the
> label, what would you add to the following SQL to make the necessary
> linefeeds when the column changes?
[Quoted] greg, if there's a simple solution i'd like to hear it too.
until then, calculate your longest line (say the name line, and it's 55
chars)
Try:
> SET LINESIZE 55 <- THIS WILL MAKE IT START NEW LINE AT 55
> select RPAD(salutation||' '||first_name||' 'last_name,55),
> RPAD(address_1,55),
> RPAD(address_2,55),
> RPAD(city||', '||state||' '||zip,55)
> from customer;
any better ideas?
janet
Received on Fri Feb 21 1997 - 00:00:00 CET