|
What does "update the cursor data" mean? Do you want to select a row from a file into host variables and then change the contents of the host variables? There's nothing special about that. Just fetch the data and change it. The file won't be updated unless you use the UPDATE or INSERT SQL verbs. On 9/3/06, 2046 BBQ <2046bbq@xxxxxxxxx> wrote:
I tried this statement before, it will also update cursor data and actual PF, i just want update the cursor data, not the PF. date: Fri, 1 Sep 2006 12:11:31 -0400 > from: rob@xxxxxxxxx > subject: Re: Can I update sql cursor data? > > Like "where current of"? > > exec sql declare c1 cursor for select myfield from myfile where > myotherfield='A'; > exec sql open c1; > exec sql fetch c1 into :workField; > exec sql Update myfile set myfield=myfield*1.01 where current of c1; > ... > exec sql close c1; > > > > Rob Berendt Subject > Can I update sql cursor data? > > > I want to change the sql cursor data while using embedded sql in RPGLE > beacaue i don't want to use temp file to store the result data & change > the > necessary data then do something > step like that > 1. select data into cursor > 2. fetch cursor data > 3. update curosr data (not actual relative PF) > 4. then fetch cursor data again from top for processing > -- This is the RPG programming on the AS400 / iSeries (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 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.