× 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.



Urgh.

Okay, this may not be a cursor, but it's darned close. This isn't even using a screwdriver as a hammer, it's using an engine block.

And I suspect the performance is somewhat less than optimal. I'm afraid to even think about the type of joins that are occurring under the covers...

Joe

OK... Decided to post regardless of the answer to whether 6 days is a hard value.

If it is, the following works, without recursion.

Unfortunately I cannot currently performance test this.

update orders set ship_date =
select day6.dt from
calndr day1, calndr day2, calndr day3
, calndr day4, calndr day5, calndr day6
where day1.dt=(select min(dt) from dates where dt>order_date
and flag='Y')
and day2.dt=(select min(dt) from dates where dt>day1.dt
and flag='Y')
and day3.dt=(select min(dt) from dates where dt>day2.dt
and flag='Y')
and day4.dt=(select min(dt) from dates where dt>day3.dt
and flag='Y')
and day5.dt=(select min(dt) from dates where dt>day4.dt
and flag='Y')
and day6.dt=(select min(dt) from dates where dt>day5.dt
and flag='Y')



Never say, "never."
---
--
Dennis


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.