Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for multiple records based on dates stored in multiple field

Status
Not open for further replies.

Regression

IS-IT--Management
Oct 10, 2002
17
US
Hello All,

I am trying to create a query that will find any records that have a date that falls in a given range.

The problem I am having is searching multiple fields containing dates.

How can I enter the date once and have it check all these fields for any matches.

The design is I have six fields that allow you to schedule a follow up. I want to run a query to see if any of these fields contain a date between a specified range.

CustID EvalID FUDate FUDate1 FUDate2 FUDate3 FUDate4 FUDate5

I want the query to return the record if any of the follow up date fields contain a valid date (Between [Enter Start Date:] and [Enter End Date:]).


Thanks
 
Nevermind got it. Just using standard or. =)Typed the SQL wrong. <Blushes>
 
You have a serious design problem

create a union query, save it. then query from that

select CustID, EvalID, FUDate, FUDate1 as dtfld
from tbl
union select CustID, EvalID, FUDate, FUDate2 as dtfld
from tbl
union select CustID, EvalID, FUDate, FUDate3 as dtfld
from tbl
etc..



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top