Re: HELP - PL/SQL using DBMS_SQL in Store Procedures doesn't work

From: Larry Jones <lljo_at_chevron.com>
Date: 1997/07/30
Message-ID: <33DF767B.16E5_at_chevron.com>#1/1


Thanks for the idea, but I have to do this as a temporary table. I have to retrieve data for the current year, plus the previous two years, on one row. I started out doing it as a view, but it was a MONSTER create statement that had it's own problems, so I moved to this type of approach.

Steve Johnson wrote:
>
> When executing the DBMS_SQL.PARSE command with a DDL statement it also
> performs the execute. I'm not sure what happens if you try to Execute
> it
> also. In my code I also OPEN, PARSE, EXECUTE if not a DDL and CLOSE
> each time I perform a call to DBMS_SQL. You might have to close your
> current cursor and open a new one for each SQL statement. I use a
> database procedure inside a package to do this and I pass a SQL
> statement
> to it. None of the statements passed to this code are DDL so I issue
> DBMS_SQL.EXECUTE.
>
>
> I think that I'd also use views, if possible, instead of temporary
> tables. This way it wouldn't take up any space and you wouldn't have to
> drop them you could - Create or Replace view xxxxx as.
>
> Hope this helps
> Steve J.
 

-- 
**********************
Larry Jones
lljo_at_chevron.com
Received on Wed Jul 30 1997 - 00:00:00 CEST

Original text of this message