Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> What's wrong with my SQL???

What's wrong with my SQL???

From: Wells <wshammou-NoSpam_at_optonline.net>
Date: Wed, 14 Aug 2002 01:25:17 -0400
Message-ID: <3Rl69.168161$D8.6056970@news4.srv.hcvlny.cv.net>


Hi all,

I can't for the life of me see what is wrong with this sql in a stored proc. Any help is greatly appreciated.
---------------code-------------
CREATE OR REPLACE PROCEDURE ReSeedSequences (v_seq_owner IN varchar2 , v_seq_name IN varchar2 , v_table_name IN varchar2 , v_error OUT varchar2) AS

seqno_val binary_integer;

sql_txt varchar2(200);

BEGIN DBMS_OUTPUT.PUT_LINE('Now processing Sequence ' || v_seq_name || ' for Trial ' || v_seq_owner || '.');

sql_txt := 'select max(seqno) + 1 SEQNO from ' || v_seq_owner || '.' || v_table_name || ' Returning SEQNO into :1';

DBMS_OUTPUT.PUT_LINE('SQL: ' || sql_txt);

EXECUTE IMMEDIATE sql_txt RETURN INTO seqno_val;

...

-----------------end code--------------

The "sql_txt" line is the problem. Oracle error is: "Error: ORA-00933: SQL command not properly ended"

Using Oracle 8.1.7.0 EE.

Thanks so much,

Wells... Received on Wed Aug 14 2002 - 00:25:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US