Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cursors using sql string

SniipeJul 31 2007 — edited Aug 2 2007
Hello,

I have a stored procedure like follows where p_cursor IN OUT cursor
thissql := 'SELECT distinct ';
thissql := thissql || 'name, age, height ';
thissql := thissql || 'from table';
thissql := thissql || 'where name = '''|| trim(p_inputName) ||''' ';

open p_cursor FOR thissql;

begin
   execute immediate thissql;
end;
Now the above is used to go back to asp.net where I go thru the cursor.

BUT, what I want to do with the above is instead of returning a cursor, I want to either loop thru the cursor for the 1 row and take out name age and height... or do away with the cursor... but 'into' won't work for this...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2007
Added on Jul 31 2007
10 comments
972 views