Re: CREATE/TRUNCATE in PL/SQL???
Date: 1996/06/22
Message-ID: <4qgob8$ope_at_news5.erols.com>#1/1
The heart of the problem is that you are trying to build and execute an SQL statement dynamically.
If you are running PL/SQL 2.3, you should look at the package DBMS_SQL. If you are not running at least 2.3 then you are SOL.
This package will allow you to build a SQL statement and execute it.
This should take care of both questions.
unknown (Mike) wrote:
>Hi!
>I'm working on a data link between Visual Basic Client-programs
>through an Oracle (7.1) Data Base to a Unisys Mapper-system.
>This involves stored procedures in Oracle communicating with
>a C Batch program through DBMS_PIPE.
>However, since I´m not a very experienced Oracle User I have some
>problems with the stored procedures.
>1. I need to store data in an Oracle Table with the (new) name
>sent to the procedure as a parameter. But it seems I can't use
>neither CREATE nor TRUNCATE in PL/SQL. I can use them in SQLPlus
>but that doesn´t help me very much. What do I do?
>2. How do use a table name in a variable in for example a SELECT.
>i.e. select * from mytable
>where mytable is the table with the name contained in the variable
>mytable??
>Grateful for answers since at the moment I seem to be stucked.
>Michael Stenfelt
>Sweden
Received on Sat Jun 22 1996 - 00:00:00 CEST