Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL+ SELECT statement need help

RE: SQL+ SELECT statement need help

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Mon, 27 Aug 2001 19:44:28 -0700
Message-ID: <F001.003790C3.20010827195524@fatcity.com>

Sinardy,
Here is one way to do it (using CHR(10) for new line) :

SELECT 'NAME : ' || ename || CHR(10) || ' DEPARTMENT : ' || dept || CHR(10) || ' SALARY : ' || sal
FROM emp;

HTH, Regards,

> -----Original Message-----
> From: Sinardy [SMTP:sinardyxing_at_bcsis.com]
> Sent: Monday, August 27, 2001 10:41 PM
> To: Multiple recipients of list ORACLE-L
> Subject: SQL+ SELECT statement need help
>
> Hi all,
>
> 1. I have table emp (ename, dept, sal)
> 2. I do
> SELECT 'NAME : ' || ename || ' DEPARTMENT : ' || dept || ' SALARY
> : ' ||
> sal
> FROM emp;
>
> Result:
>
> NAME : JAMES DEPARTMENT : LAB ENGINEER SALARY : 2000
> NAME : BOB DEPARTMENT : DRIVER SALARY : 2000
>
>
> 3. I can I break them to be like
>
> Name : JAMES
> DEPARTMENT : LAB ENGINNER
> SALARY : 2000
>
> NAME : BOB
> DEPTARTMENT : DRIVER
> SALARY : 2000
>
> something like a new line ('/n') in C++
>
> SELECT 'NAME : ' || ename || '/n DEPARTMENT : ' || dept || '/n
> SALARY :
> ' || sal
> FROM emp;
>
>
> Thank you
>
> Sinardy
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Sinardy
> INET: sinardyxing_at_bcsis.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Aug 27 2001 - 21:44:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US