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!

Invalid Identifier In Procedure

DaveyBJun 7 2011 — edited Jun 7 2011
Hi All,

I have an example procedure which I am trying to pass two arguments.

Unfortunately when I do this, I get the below error:
ORA-00904: "V_END_DATE": invalid identifier
ORA-06512: at "PROCEXAMPLE", line 10
ORA-06512: at line 2

Before I pull out the rest of my hair, is it possible to let me know what is going wrong? I know what the error means but I can't see where I have I have got an invalid identifier. Even on line 10. :P


PASSING ARGUEMENTS TO PROCEDURE
BEGIN
    procExample (   p_start_date => '01/01/2011', 
                        p_end_date => '07/01/2011') ;
END  
;
PROCEDURE
{
CREATE OR REPLACE PROCEDURE procExample(p_start_date in varchar2, p_end_date in varchar2) is
v_start_date date;
v_end_date date;

begin
v_start_date := to_date(p_start_date,'dd/mm/yyyy');
v_end_date := to_date(p_end_date,'dd/mm/yyyy');

EXECUTE IMMEDIATE 'CREATE TABLE test_a AS
SELECT v_start_date, v_end_date FROM DUAL' ;
end procExample;
}
This post has been answered by Frank Kulash on Jun 7 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2011
Added on Jun 7 2011
5 comments
1,084 views