Re: Return ColumnNames in lowercase. (split from highjacked thread http://www.orafaq.com/forum/t/175479/0/unread/#msg_648450 by bb) [message #648450] |
Tue, 23 February 2016 08:15 |
|
sss111ind
Messages: 636 Registered: April 2012 Location: India
|
Senior Member |
|
|
Hi All,
How can the result header returned in lower case. For example
ename ,empno,sal instead of ENAME,EMPNO,SAL. P
Please suggest.
set define off;
CREATE OR replace PACKAGE test_pkg1
IS
TYPE emp_type IS RECORD (
"ename" VARCHAR2(20),
"empno" NUMBER,
"sal" NUMBER );
TYPE emp_table
IS TABLE OF EMP_TYPE;
FUNCTION Emp_reverse
RETURN EMP_TABLE pipelined;
END;
/
CREATE OR replace PACKAGE BODY test_pkg1
AS
FUNCTION Emp_reverse
RETURN EMP_TABLE pipelined
IS
out_rec_emp EMP_TYPE;
CURSOR emp_cur IS
SELECT ename,
empno,
sal
FROM emp;
BEGIN
OPEN emp_cur;
LOOP
FETCH emp_cur INTO out_rec_emp;
EXIT WHEN emp_cur%NOTFOUND;
pipe ROW(out_rec_emp);
END LOOP;
END;
END test_pkg1;
/
select * from table(test_pkg1.emp_reverse);
Regards,
Nathan
|
|
|
|
Re: Return ColumnNames in lowercase. [message #648452 is a reply to message #648451] |
Tue, 23 February 2016 08:33 |
|
sss111ind
Messages: 636 Registered: April 2012 Location: India
|
Senior Member |
|
|
Thanks for response, I am getting values of the column header in upper case but the same header value I need in lower case.
ENAME EMPNO SAL
------------------------
MARTIN 7654 1250
BLAKE 7698 3135
CLARK 7782 2695
SCOTT 7788 3000
KING 7839 5000
TURNER 7844 1500
ADAMS 7876 1100
[Updated on: Tue, 23 February 2016 09:37] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|