|
On Fri, 2005-10-28 at 16:29 -0400, Fisher, Don wrote: > How about: > (DATE_YY > SelectedYear or > (DATE_YY = SelectedYear and > (DATE_MM > SelectedMonth or > DATE_MM = SelectedMonth and > DATE_DD >= SelectedDay))) and > (DATE_YY < Selected Year or > (DATE_YY = SelectedYear and > (DATE_MM < SelectedMonth or > DATE_MM = Selected Month and > DATE_DD <= SelectedDay))) > > Out of curiosity, why do you want to use SQL if the RPG code can easily > select the records? > Code is already written that uses embedded SQL to select records for one day. The current code runs in just a few seconds Now, need to select by date range, and am hoping to do so without having to redo the whole program. If I update the program to use any of the methods I've thought of so far, I wind up having the program run for perhaps fifteen minutes or half an hour while it spins on a table scan. I'll give this one a try and see how it works out. Thanks. Regards, Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.