Q: DBMS_SQL and select count(*) into :x - error ORA-01006
Date: 1997/11/29
Message-ID: <ABuOsVqGVI_at_yamb.ygaz.tyumen.su>#1/1
Hi!
[Quoted] I ask you to help, if there will be a time.
In the documentation:
Oracle7 Server Application Developer's Guide, chapter 10 Using Dinamic SQL
I did not manage to find the answer for the decision of a task.
It is necessary to create a procedure for definition of quantity of records
in different tables.
In these tables is identical column - date _ rec (date)
With run of a procedure recno_tab there is a error ORA-01006 Bind variable does not exist
Prompt, please, in what here error?
create or replace procedure recno_tab
( tname in varchar2, date_a in date, n_row out number) as
i number; x number; n number;
cmd varchar2 (200);
begin
i: = dbms_sql.open_cursor;
[Quoted] [Quoted] cmd: ='select count (*) into :x from '||table_name||
' where date_rec='||date_a||";
dbms_sql.parse (i, cmd, dbms_sql.v7);
dbms_sql.bind_variable (i, ':x', n);
x: = dbms _ s(i))
dbms_sql.close_cursor(i))
n_row: = n;
end;
[Quoted] Very much I ask to answer on e-mail.
Yours faithfully, Nikolai Osipov
Yamburg Tyumen Russia
nfo_at_yamb.ygaz.tyumen.su
Received on Sat Nov 29 1997 - 00:00:00 CET