× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jon,

Right now I'm using V5R3, so I can't give you a working example but,
Couldn't this be done using recursive SQL?

Also, maybe you could write a small UDF that accepts the input date and
number of days as parameters, process your calendar table and returns the
appropriate date.

HTH,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--



On Tue, Jul 12, 2011 at 12:00 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>wrote:

I'm collecting alternative solutions for a couple of SQL "problems" -
things that would be relatively easy (if laborious) in native RPG.

So ... given that I have a table ORDERS which contains order and shipping
dates, I need to populate the shipping dates such that the shipping date is
6 "business days" after the order date.

Business days can be determined from a calendar table keyed on date and
which contains a "Y" or "N" to indicate whether that date is a business day
or not.

Any ideas? The only ones we come up with are so darn nasty.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com <http://www.systemideveloper.com/>




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.