× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Surprisingly, nobody's thrown my name out here yet...but "if you're
using a cursor you're probably doing something wrong" is definitely a
phrase I've thrown out here many times.

The point being SQL is designed for sets or records, but to many
people do things row by row since that what they are used to.

It's not just our platform, happens on other too. One of the MS SQL
Server guru's coined the term RBAR - Row By Agonizing Row....pherhaps
I'll steal it :)

Sometimes cursors are the right or the only way to do something...but
too often they are a poor choice.

In any event, like Scott, I'm confused as to what you're asking.
SQL-CLI doesn't really factor into the use or non-use of cursors.

What do you want to do?

Charles

On Thu, Nov 18, 2010 at 12:34 PM, Jeff Young <cooljeff913@xxxxxxxxx> wrote:
I have seen it indicated in many posts in the past that if you are using cursors
in SQL, you are doing something wrong.
If I have only RPGLE and CL to work with and SQL-CLI is not an option, how would
I select multiple rows for a set of conditions and return them in an ordered
condition using embedded SQL with a CURSOR?

Thanks,

Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions
Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical
Solutions Implementer V5R3
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.