ORACLE using function parametes in where claus
- by Gainder
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 he could't fetch the row.
If insted of WHERE fl.nome = nome; I write WHERE fl.nome = 'folder1'; insted of passing it as parameter it works. 
I think im not using the parameter in the right way.
How can I use it?