James,
Why declare two cursors when one will do?
Declare C1 cursor for
select CMCSNAME, CMADDR1, CMCITY, CMCST#6, CMCST#3
from CUSTML1
where CMCSNAME >= :SHCSNAME
and CMCSNAME LIKE:csgrpkwda
and :SHCO# IN( 0, CMSRVCO# )
and CMDEL <> 'D'
order by CMCSNAME
Paul Morgan
Principal Programmer Analyst
IT Supply Chain/Replenishment
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James Rich
Sent: Friday, October 28, 2011 3:05 PM
To: midrange-l
Subject: SQL RPG question
I need to create one of two SQL statements conditionally, but when I try
to compile the source the compiler errors with:
SQL0051 30 289 Position 25 Cursor or procedure C1 previously
declared.
The source I'm working with is at:
http://code.midrange.com/37665d27b6.html
How do I conditionally create these SQL statements?
James Rich
if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev
As an Amazon Associate we earn from qualifying purchases.