Home » SQL & PL/SQL » SQL & PL/SQL » stored procedure and truncate
stored procedure and truncate [message #36767] Wed, 19 December 2001 04:06 Go to next message
Thierry
Messages: 9
Registered: January 2000
Junior Member
this stored procedure is valid, but when i use it,
begin
ic_truncate_table ('ic_insc_presence');
end;
i've got an error

why?
thanks
CREATE OR REPLACE PROCEDURE IC_TRUNCATE_TABLE (v_tab_name in varchar2) is

TexteSQL varchar2(2000);
BEGIN
TexteSql:='EXECUTE IMMEDIATE '||''''||'TRUNCATE TABLE '||v_tab_name||'''';
Execute immediate(TexteSql);
END ;

----------------------------------------------------------------------
Re: stored procedure and truncate [message #36768 is a reply to message #36767] Wed, 19 December 2001 06:07 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
TexteSql:='TRUNCATE TABLE '||v_tab_name||';

----------------------------------------------------------------------
Previous Topic: How can i control all users that come in the database?
Next Topic: Easier way to change seconds?
Goto Forum:
  


Current Time: Mon Mar 30 03:13:24 CDT 2020