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

Home -> Community -> Mailing Lists -> Oracle-L -> Querying all_tab_columns using stored procedure

Querying all_tab_columns using stored procedure

From: <lynxidajax_at_myrealbox.com>
Date: Wed, 26 Jun 2002 00:13:19 -0800
Message-ID: <F001.0048806B.20020626001319@fatcity.com>


RE: recording SQLPlus activityDear All,
I'm created stopre procedure like below:

CREATE OR REPLACE PROCEDURE X1990.test(ptable varchar2) IS

   CURSOR c1 IS

      SELECT   column_name ||
               '||'''      ||
               ','         ||
               '''||' col
      FROM     all_tab_columns
      WHERE owner = 'X2002'             AND
            table_name LIKE UPPER (ptable)
      ORDER BY column_id;

   c1rec                         c1%ROWTYPE;
BEGIN
   OPEN c1;

   LOOP

      FETCH c1 INTO c1rec;
      EXIT WHEN c1%NOTFOUND;

   dbms_output.put_line(c1rec.col);
   END LOOP;    CLOSE c1;
END; The above procedure return blank...
But when I'm querying the all_tab_columns directly from sqlplus it's returned some values.

for your information, I'm accessing the store procedure from another schema. How to solve this problem???

regards,

Ahmadsyah A.N.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: lynxidajax_at_myrealbox.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 Wed Jun 26 2002 - 03:13:19 CDT

Original text of this message

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