Home » SQL & PL/SQL » SQL & PL/SQL » function errored out as saying exp not an identifier
function errored out as saying exp not an identifier [message #214394] Tue, 16 January 2007 04:31 Go to next message
vikram1780
Messages: 222
Registered: January 2007
Location: Bangalore
Senior Member
CREATE OR REPLACE FUNCTION test_exp
(targetsystem VARCHAR2, mastertable varchar2, action varchar2 ) RETURN LONG AS
Pexp long:='';
BEGIN
Select exp into pexp from EXPRESSION_FILTER_MATRIX
Where target_system=targetsystem and master_table=mastertable and action=action;

RETURN pexp;
END test_exp;


The abve function is creating erros while compiling
as
"exp" invalid identifier.

Its a database column and the above querry is returning only one row.

Can anyone help in solving this problem

Thanks in advance
Re: function errored out as saying exp not an identifier [message #214399 is a reply to message #214394] Tue, 16 January 2007 04:41 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
1. EXP is an Oracle reserved word. It is bad practice to use reserved words as identifiers.
2. The SELECT syntax in PL/SQL IS:
SELECT <column>
INTO   <plsql_variable>
FROM   <table>
WHERE <...>

3. The error message is clear: Oracle cannot find the column in that table. Check the table, perhaps you've spelled something wrong.

MHE
Previous Topic: Entries in Tnsnames.ora and Sqlnet.ora
Next Topic: Query tune
Goto Forum:
  


Current Time: Tue Dec 06 06:23:11 CST 2016

Total time taken to generate the page: 0.13192 seconds