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

Home -> Community -> Mailing Lists -> Oracle-L -> Rollback after truncate?? + 2 more questions :-)

Rollback after truncate?? + 2 more questions :-)

From: Csillag Zsolt <starsoft_at_interware.hu>
Date: Wed, 15 Aug 2001 14:06:18 -0700
Message-ID: <F001.0036C1EC.20010815140821@fatcity.com>

Hi,

1.Can I rollback after doing a truncate table (it seems to me that I can' t) e.g.

       Execute Immediate 'Truncate Table '|| TablaNevTomb(i);

       Execute Immediate
          'Begin '||
            'Insert into '|| TablaNevTomb(i) ||' (Select * From 
X$_'||TablaNevTomb(i)||');'||
          'End;';

     Exception
       When others Then RollBack

2. Is there a way to use a command with more than one word in Pl/Sql without using it dynamically?

For example I can use "Truncate table" only with Execute immediate within a Pl/Sql block.

3. I have a statement in a package:

  Insert into A

     ( Select Col1 ,MyFunction(Col1)
         from B );

If the MyFunction function is made with "create or replace function" everything works perfectly,
but if the same function is declared within the package, I get the error message:
PLS-00231 function 'string' may not be used in SQL

Thank you for your help

Zsolt Csillag
Hungary

--

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

Author: Csillag Zsolt
  INET: starsoft_at_interware.hu

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 Aug 15 2001 - 16:06:18 CDT

Original text of this message

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