Home » SQL & PL/SQL » SQL & PL/SQL » help with some DBMS_SQL Code
help with some DBMS_SQL Code [message #567] Thu, 21 February 2002 00:28 Go to next message
Micky
Messages: 18
Registered: January 2002
Junior Member
Hi

Can you please explain the highlighted coding for me. I have marked the specific code with /*-->.

1. Can U explain what DBMS_SQL.NATIVE role in all this is?

create or replace procedure drop_table
(v_table_name IN VARCHAR2)
is
dyn_cur number;
dyn_err varchar2(255);
begin
/*-->dyn_cur:=DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(dyn_cur,'drop table'||v_table_name,/*-->DBMS_SQL.NATIVE);
DBMS_SQL.CLOSE_CURSOR(dyn_cur);
exception
WHEN OTHERS THEN
/*-->dyn_err:=sqlerrm;
/*-->DBMS_SQL.CLOSE_CURSOR(dyn_cur);
RAISE_APPLICATION_ERROR(-20600,/*-->dyn_err);
end drop_table;
/
sho err

Cheers Micky
Re: help with some DBMS_SQL Code [message #569 is a reply to message #567] Thu, 21 February 2002 07:50 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
give space after 'drop table '

create or replace procedure drop_table
(v_table_name IN VARCHAR2)
is
dyn_cur number;
dyn_err varchar2(255);
begin
dyn_cur:=DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(dyn_cur,'drop table '||v_table_name,DBMS_SQL.NATIVE);
DBMS_SQL.CLOSE_CURSOR(dyn_cur);
exception
WHEN OTHERS THEN
dyn_err:=sqlerrm;
DBMS_SQL.CLOSE_CURSOR(dyn_cur);
RAISE_APPLICATION_ERROR(-20600,dyn_err);
end drop_table;
MORE ! PLS help with some DBMS_SQL Code [message #571 is a reply to message #569] Thu, 21 February 2002 10:31 Go to previous messageGo to next message
Micky
Messages: 18
Registered: January 2002
Junior Member
I've highlighted the areas that I don't follow with
--> symbol.
Can you also explain DBMS_SQL.NATIVE?
Re: help with some DBMS_SQL Code [message #572 is a reply to message #567] Thu, 21 February 2002 11:44 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
DBMS_SQL
Previous Topic: not equal- != or <>
Next Topic: Creating a union of 3 views
Goto Forum:
  


Current Time: Mon Sep 27 09:21:02 CDT 2021