ORACLE: Parameter reference in WHERE doesn't work
Posted
by Gainder
on Stack Overflow
See other posts from Stack Overflow
or by Gainder
Published on 2010-05-24T20:17:24Z
Indexed on
2010/05/24
21:01 UTC
Read the original article
Hit count: 216
Hello, I have created a simple static function in oracle 10g to get the reference of an object based on his pk.
STATIC FUNCTION getRef(nome IN VARCHAR2)
RETURN REF folder_typ IS
fl_r REF folder_typ := null;
BEGIN
SELECT REF(fl)
INTO fl_r
FROM folder_tab fl
WHERE fl.nome = nome;
RETURN fl_r;
END getRef;
This gives me an error because it could't fetch a row.
If insted of WHERE fl.nome = nome;
I write WHERE fl.nome = 'folder1';
-- it works.
I think im not using the parameter in the right way. How can I use it?
© Stack Overflow or respective owner