for the first rule use the between keyword: where startdate between
startdate and enddate

for the 2nd rule, compare if the endDate = startDate + 1 days

-Steve


On Wed, Dec 20, 2023 at 12:27 PM Dave <dfx1@xxxxxxxxxxxxxx> wrote:

Hi,

I never thought I would need to make a request and SQL could not help
me, but I can't see how I could use it here.
Any ideas how I can accomplish this? In the exemple, I need to extract
clients C3 and C4. C3 because one of the periods overlap; C4 because the
2nd period does not immediately follow the 1st one.

Client StartDate EndDate
C1 2023-05-31
C2 2023-01-01 2023-04-15
C2 2023-04-16 2023-12-31
C3 2023-02-28 2023-06-01
C3 2023-04-01
C4 2023-10-11 2023-11-13
C4 2023-11-15

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.