473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to exclude results from data based on dates

I have a database with the following structure:

IDNO - Text(7), From Date - Date, To Data - Date, Year - Number, Full_Part - Logical.

I want to take out the missing date ranges for each IDNO for each particular year. ie.. I need to take out the year wise gaps for records. also, if the entire year is missing then the gap will be the entire year with the full_part field in the result showing F. so say.. in this example.. i need the program to return the result for

IDNO From Date To Date Year FULL_PART
A247108 01-Apr-02 30-Sep-02 2002 P
and
A247111 01-Jul-99 30-Sep-99 1999 P
A247111 01-Jan-00 31-Mar-00 1999 P (year is 1999 because it falls in the 1999-2000 financial year)
A sample database is appended below :-
IDNO From Date To Date Year FULL_PART
A247108 01-Apr-99 31-Mar-00 1999 F
A247108 01-Apr-00 31-Mar-01 2000 F
A247108 01-Apr-01 31-Mar-02 2001 F
A247108 01-Oct-02 31-Mar-03 2002 F
A247108 01-Apr-03 31-Mar-04 2003 F
A247111 01-Apr-00 31-Mar-01 2000 F
A247111 01-Apr-01 31-Mar-02 2001 F
A247111 01-Apr-02 31-Mar-03 2002 F
A247111 01-Apr-03 31-Mar-04 2003 F
A247111 01-Apr-99 30-Jun-99 1999 P
A247111 01-Oct-99 31-Dec-99 1999 P
A247124 01-Apr-99 31-Mar-00 1999 F
A247124 01-Apr-00 31-Mar-01 2000 F
A247124 01-Apr-01 31-Mar-02 2001 F
A247124 01-Apr-02 31-Mar-03 2002 F
May 26 '10 #1
0 911

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: A_Rodrigues | last post by:
Hi Given a form with a date formated text box on it, which will serve as an input box for dates, how can I write a VBA sentence in order to apply a filter with that input? Suppose text box is...
5
by: Mark Broadbent | last post by:
Does anyone know why some genius decided that data based breakpoints are not supported in C#/ vb.net debugging? Is there some technical reason Or has it been done to make breakpointing more...
0
by: starman7 | last post by:
Hello MySQL Gurus - I have 3 tables: all_customers, opt_out_customers, and opt_in_customers Let's say there's an id column and an email_address column in each. I'm sending a newsletter -...
4
by: jdph40 | last post by:
I enter data into a database that resides on our network. Other employees can print reports from the database, but they have no way of telling if I've entered all the data. For instance, on...
2
by: maverick10gk | last post by:
Hello All, This post and my previous post are the last pieces that I need to tie up before my DB tool is complete. What I am trying to do here is to allow a person to select a date range, their...
3
by: Phoe6 | last post by:
I would like to parse RFC 1123 date format and compare two dates. I find that datetime module does not specifically confirms to any RFC. Any suggestions as how I can handle the RFC 1123 date...
1
by: bips2005 | last post by:
i have got two tables,one customer with fields cust_id,email and another with field cust_id,domname,expirydate. i have this query to combine these two tables to give me email and the expirydate as ...
4
by: singhals | last post by:
I have hundereds of rows of data which goes something like this Date Value 12/31/2009 52 1/1/2009 455 1/1/2005 497 1/1/2009 ...
4
by: Emily Crawford | last post by:
I have a query that has two date fields. One date field is from the Request Table and it is called RequestDate - the date the employee requested training. The second date field is called ClassTaken...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.