473,385 Members | 1,907 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,385 software developers and data experts.

searching date from multiple columns

1
Hello:

I would like to search for a date from a table.

I have a table that contains 3 fileds: JobID, JobTitle, and JobDeadlineDate

Through a query I managed to generate 3 more fields, i.e. 1st reminder = JobDeadlineDate - 30, 2nd Reminder = JobDeadlineDate -15, and 3rd Reminder = JobDeadlineDate - 7

Now I would like to generate a list of jobs, that matches the current date with either JobDeadlineDate, 1st Reminder, 2nd Reminder or 3rd Reminder.

The list fetches a date by matching it with the current date or a range of dates and tell me whether the date is a 1st reminder or a 2nd or 3rd or a Deadline.

Can you tell me how can I make this possible?
Oct 19 '06 #1
1 1460
MMcCarthy
14,534 Expert Mod 8TB
SELECT JobID, JobTitle, JobDeadlineDate, 1st Reminder, 2nd Reminder, 3rd Reminder FROM Query1
WHERE (JobDeadlineDate=#[Forms]![FormName]![DateField]#)
OR (1st Reminder=#[Forms]![FormName]![DateField]#)
OR (2nd Reminder=#[Forms]![FormName]![DateField]#)
OR (3rd Reminder=#[Forms]![FormName]![DateField]#);

This query is based on a date being entered in a form.
Using date ranges would be fairly messy because you have four fields to look at but if you really need to:

change

WHERE (JobDeadlineDate=#[Forms]![FormName]![DateField]#)

to

WHERE (JobDeadlineDate BETWEEN #[Forms]![FormName]![DateField1]# AND #[Forms]![FormName]![DateField2]#)

etc....



Hello:

I would like to search for a date from a table.

I have a table that contains 3 fileds: JobID, JobTitle, and JobDeadlineDate

Through a query I managed to generate 3 more fields, i.e. 1st reminder = JobDeadlineDate - 30, 2nd Reminder = JobDeadlineDate -15, and 3rd Reminder = JobDeadlineDate - 7

Now I would like to generate a list of jobs, that matches the current date with either JobDeadlineDate, 1st Reminder, 2nd Reminder or 3rd Reminder.

The list fetches a date by matching it with the current date or a range of dates and tell me whether the date is a 1st reminder or a 2nd or 3rd or a Deadline.

Can you tell me how can I make this possible?
Oct 20 '06 #2

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

Similar topics

4
by: Gleep | last post by:
Hey Guys, I've got a table called Outcomes. With 3 columns and 15 rows 1st col 2nd col 3rdcol outcome date price There are 15 rows...
0
by: Ralph Guzman | last post by:
I have to do a catalog search through multiple tables and columns for product model number, description, and name. I realize that doing pattern matching with multiple LIKE statements is slow so I...
3
by: jas | last post by:
> This is what I want to do with the data table below. > > I only want it to show one id for each issue. ( ie, 4001 only once, > 4002 only once, etc. But only the one with the latest date and...
1
by: smita | last post by:
Hi, I want to search an xml file for particular searchstrings and also based on the date i.e. all items containing the date -----prior to the specified date, or ----on that date or ----- after the...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
7
by: Brian Mitchell | last post by:
Is there an easy way to pull a date/time stamp from a string? The DateTime stamp is located in different parts of each string and the DateTime stamp could be in different formats (mm/dd/yy or...
33
by: Geoff Jones | last post by:
Hiya I have a DataTable containing thousands of records. Each record has a primary key field called "ID" and another field called "PRODUCT" I want to retrieve the rows that satisy the following...
20
by: keri | last post by:
Hi, I am creating a table where I want to use the date as the primary key - and to automatically create a record for each working date (eg Mon to Fri) until 30 June 2007. Is this possible? I do...
2
by: Coxmg | last post by:
I have several related tables. One table lists orders with due dates for SKUs while another table lists components of a SKU (diamonds). A third related table lists diamond IDs and diamond inventory....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.