Hi All, I need help with creating an SQL.
I have a table with many fields but there are 3 relevant fields for my
problem.
Field1, From Date, Thru Date
The Date fields are date ranges, defined as packed(7:0) and have valid
dates in *cymd format. I need to find Field 1 values where there is a gap
between the date ranges.

For example, if my table has:
F1, 1230101, 1241231
F1, 1250101, 1261231
F1, 1270101, 1270630
F2, 1260101, 1260215
F2, 1260216, 1261231
F2, 1260601, 1271231 (the date ranges may overlap or even be same)
F3, 1240101, 1240331
F3, 1240601, 1241231
F4, 1240101, 1241231
F5, 1240101, 1241231
F5, 1250301, 1250630

I need to find values F3 and F5

Can this be done using SQL? It is a one time exercise to query the data, so
multiple SQLs with intermediate files is also okay.

TIA
Vinay

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.