Hi again everybody,
I'll try to be as descriptive as possible, sorry if
I leave anything important out.
I have the following function which I'm compiling
using PL/SQL Developer (tnx Djordje).
CREATE OR REPLACE FUNCTION check_for_name (p_name_to_check VARCHAR) RETURN BOOLEAN IS CURSOR c_namestbl IS SELECT lname FROM names WHERE lname = p_name_to_check; v_return_value BOOLEAN; BEGIN OPEN c_namestbl; IF c_namestbl%NOTFOUND THEN v_return_value := FALSE; ELSIF C_namestbl%FOUND THEN v_return_value := TRUE; END IF; RETURN v_return_value; CLOSE c_namestbl; END check_for_name; It compiles without errors (now). The table 'names' is built like this : SVRMGR> DESCRIBE names; With data like this : SVRMGR> SELECT * FROM
names; But, whenever I try to do this : EXECUTE check_for_name('Cruise');so I can run the function from PL/SQL Developer I get the following error : "ORA 0900 - Invalid SQL Statment" However, If I execute the same statement from SQL*Plus or svrmgrl I get a differant error : SVRMGR> EXECUTE
check_for_name('Cruise'); I'm running Oracle Enterprise Edition 8.1.5.0.0 on Windows 2000. If that's not enough info, please let me know and I will supply whatever I can. Thanks for reading this far :) Michael.
|
- RE: Can't code for s.... peanuts
- RE: Can't code for s.... peanuts Vadim Gorbounov
- RE: Can't code for s.... peanuts Jamadagni, Rajendra
- RE: Can't code for s.... peanuts Koivu, Lisa
- Re: Can't code for s.... peanuts William Beilstein
- RE: Can't code for s.... peanuts Norrell, Brian
- Re: Can't code for s.... peanuts JOE TESTA
- RE: Can't code for s.... peanuts schmoldt
- RE: Can't code for s.... peanuts Yadav, Shailesh
- Re: Can't code for s.... peanuts Dennis M. Heisler
- RE: Can't code for s.... peanuts John Lewis