Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting error "ORA-00933: SQL command not properly ended"

902424Dec 1 2011 — edited Dec 2 2011
Hi,

I am getting error of "ORA-00933: SQL command not properly ended" when executing procedure:


variable x refcursor
execute fetch_data3('ttransaction','01-JAN-2011',:x);

Procedure :
CREATE OR REPLACE PROCEDURE "TESTSCHEMA"."FETCH_DATA3" (
Tab_Name in varchar2,
Last_Update_Date in VARCHAR2,
Ref_Cur in out sys_refcursor
)
as
input_date date;
sql_text varchar(200);
begin
input_date := to_date(TRIM(last_update_date),'dd-mm-yy');
sql_text := 'select * from '||trim(tab_name)||'where lastupdate_date > '||input_date||' and rownum < '||1000;
open ref_cur for sql_text;
end;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2011
Added on Dec 1 2011
5 comments
5,476 views