Re: SELECTS not working in SP's?
The problem may be the conflict between your IN parameter "name" and the WHERE clause of your query, "name = parent." Since you are defining the name as a local variable in the SP, when you use "name = parent" it is using parameters for both of them, thus if you call the SP:
CALL add_attribute('john','my dad','charlie');
Your cursor definition will be:
SELECT left_position, right_position FROM attribute WHERE 'John' = 'Charlie';
This will always return no records;
If you have a "name" column in your table, you might try changing the IN parameter to a different variable to keep the SP clear on what you're trying to accomplish.
Subject
Views
Written By
Posted
3025
June 24, 2005 09:46AM
2036
June 24, 2005 10:25AM
2174
June 24, 2005 10:39AM
2004
June 24, 2005 11:57AM
Re: SELECTS not working in SP's?
2172
June 24, 2005 01:21PM
1952
June 24, 2005 01:28PM
2040
June 24, 2005 01:24PM
2041
June 24, 2005 01:25PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.