Re: How to do linefeed in SQL?

From: Pierre BAR <s780406_at_student.ulg.ac.be>
Date: 1997/02/22
Message-ID: <330F275D.289B_at_student.ulg.ac.be>#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?
>
> select salutation||' '||first_name||' 'last_name,
> address_1,
> address_2,
> city||', '||state||' '||zip
> from customer;
>
> Thanks,
> Greg

With SQL*Plus, you can use the column command with the newline Clause : column address_1 newline
column address_2 newline
column city_state newline
select salutation||' '||first_name||' 'last_name,

          address_1,
          address_2,
          city||', '||state||' '||zip city_state
from customer; Received on Sat Feb 22 1997 - 00:00:00 CET

Original text of this message