|
I am working on a program that needs to update certain records of aa
somewhat large file. Because it could potentially be run multiple times
day I would like to limit the number of records that it processes byare
creating a logical file (preferably with SQL rather than DDS). There
two fields that need to be looked at. FIELD1 could have numerouspossible
values but I'm only interested in A, B, and C. FIELD2 is a statusfield.
If it's blank then the record needs to be processed. If it has a valuebe
that I assign, such as X, then it has been previously processed and can
skipped in subsequent runs. Basically I want a logical file that doesquery
something like:
If FIELD2 <> 'X'
If FIELD1 = 'A' or FIELD1 = 'B' or FIELD1 = 'C'
process the record
FIELD1 = 'X'
update the record
ENDIF
ENDIF
I've tried setting up a logical using select and omit but it either
includes or excludes too much. I could probably do it with an open
file but that introduces a bit of overhead each time the program is run.
Can anybody recommend a good way to do this with SQL? Thanks.
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.