Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Reguarding DBMS_SQL and Dynamic SQL
Ok, I am trying to perform the following function... (not this is just a
sample clip, but the practicality is there..)
Begin
declare
temp Char(230) := '';
vGate char(230);
inv integer;
room integer := 100;
counter integer;
cid integer;
Begin
cid := dbms_sql.OPEN_CURSOR;
counter := 1;
loop
vGate := 'cil_g' || counter;
dbms_sql.parse(cid, 'select :v into :t from room_tbl where :r = room_number ', dbms_sql.v7);
dbms_sql.bind_variable(cid, ':v', vGate);
dbms_sql.bind_variable(cid, ':r', room);
dbms_sql.bind_variable(cid, ':t', temp);
dbms_output.put_line('"' || rtrim(vgate) || '"');
counter := counter+1;
exit when counter > 48;
end loop;
End;
end;
I need to get the RESULT of V into T (vGate into the Temp variable...)
this is the results that I am getting from this compile...
ORA-00905: missing keyword
ORA-06512: at "SYS.DBMS_SYS_SQL", line 491
ORA-06512: at "SYS.DBMS_SQL", line 32
ORA-06512: at line 15
Any help would be VERY appreciated..
BTW, excuse my ignorance on this issue, I am a new MSSQL convert trying to get our system to Oracle.
Thanks. Received on Tue Feb 23 1999 - 18:30:38 CST