Re: pl/sql function help

From: rajXesh <member11038_at_dbforums.com>
Date: Thu, 09 Jan 2003 17:55:45 +0000
Message-ID: <2367916.1042134945_at_dbforums.com>


Try

create or replace function fn_return_comma return varchar2 as cursor c is

  • replace with your sql select table_name from user_tables;

vret varchar2(1000);

begin

for vrec in c loop

    vret := vret || ', ' || vrec.table_name end loop;

vret := ltrim(vret, ', ');

return vret

end;

For the second part of the question, look up joins in any SQL book.

  • rajXesh

--

All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain (1835 - 1910)

Posted via http://dbforums.com Received on Thu Jan 09 2003 - 18:55:45 CET

Original text of this message