cursor for loop returns all records [message #606295] |
Wed, 22 January 2014 02:04 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/a59247482a11edb9544247f102223e8d?s=64&d=mm&r=g) |
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi,
Why the cursor for loop returns all(14) records (in form in the find button)? It is worked fine in the TOAD& SQL*PLUS
BEGIN
FOR e_cursor IN ( SELECT ename FROM emp where deptno=10 ) LOOP
dbms_output.put_line( e_cursor.ename );
END LOOP;
--EXECUTE_QUERY;
END;
output
------
KING
CLARK
MILLER
![/forum/fa/11638/0/](/forum/fa/11638/0/)
Thank You
-
Attachment: image1.png
(Size: 10.55KB, Downloaded 1368 times)
[Updated on: Wed, 22 January 2014 02:04] Report message to a moderator
|
|
|
|
|
|
|
Re: cursor for loop returns all records [message #606303 is a reply to message #606302] |
Wed, 22 January 2014 02:56 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
@mist598 - you really really need to spend some time reading the form builder help topics on querying.
Read the topic on execute_query and all the related topics (there's links in that topic)
Read the topic on enter_query and query mode and pre-query.
Read the topics on onetime_where and default_where
You've been working with forms for at least a year, you really should know by now that that cursor loop you've written has zero effect on what execute_query does.
[Updated on: Wed, 22 January 2014 02:56] Report message to a moderator
|
|
|
|