function errored out as saying exp not an identifier [message #214394] |
Tue, 16 January 2007 04:31 |
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 |
|
Maaher
Messages: 7065 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
|
|
|