Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sytnax error in Proc

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
I keep getting error ERROR line 9, col 14, ending_line 9, ending_col 15, Found ':=', Invalid identifier: :=

CREATE OR REPLACE PROCEDURE SYSVIEW.TESTREPORT (V_TEXT IN varchar2) AUTHID CURRENT_USER AS
V_VAR1 VARCHAR2 (12);
v_VAR2 INTEGER;
V_TABLE_NAME VARCHAR(50);

V_TABLE_NAME := 'TABLE_' || V_TEXT;

 
You could try putting a BEGIN and END around the actual processing SQL. A good habit in any case.

====================================
Sometimes the grass is greener on the other side because there is more manure there - original.

 
Jason,

As John suggested, the syntax problem relates to missing BEGIN and END keywords:

Code:
CREATE OR REPLACE PROCEDURE TESTREPORT (V_TEXT IN varchar2) AUTHID CURRENT_USER AS
 V_VAR1 VARCHAR2 (12);
 v_VAR2 INTEGER;
 V_TABLE_NAME VARCHAR(50);
Begin
 V_TABLE_NAME := 'TABLE_' || V_TEXT;
End;
/

Procedure created.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top