|
From: jfranz@xxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: SQL Insert Into
Date: Sun, 10 Oct 2010 21:10:16 -0400
SQL does not work this way.
The Select is not like a rpgle "chain" and that record stays in memory, with
record locked for the "update".
The update statement needs the same where clause to get the same record to
update.
Based on the where clause, your update statement could update one or more
records...
Jim Franz
----- Original Message -----
From: "Marc Couture" <couturem@xxxxxxxxxxx>
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Sent: Sunday, October 10, 2010 8:52 PM
Subject: SQL Insert Into
I'm running into a small issue, and no clue how to fix it.
After a :
Insert Into WorkFile
Select *
From Orders
Where OrdNo = 100750
Then
Update WorkFile
Set Status = 'DELETE'
I know the insert found one record, but the update statement didn't found
the record, it is probably stuck in the buffer, any idea how to force the
write to the media ?
Thanks
"If you think education is expensive, try ignorance"
(Derek Bok, pres. of Harvard Univ. 1971-1990)
--
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.
--
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 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.