We help IT Professionals succeed at work.
Get Started

Filtering for todays date with multiple dates in one field

Last Modified: 2012-07-05
I have SQL 2005.  I thought I had done this before, however, I am realizing I have not.  I have a table called MaintenanceTasks with the following fields:  dayofyear, subject, task.

Inside of this table are some examples:

dayofyear          Subject               Task

7/5, 7/6, 7/7       Take trash          Remove trash from building
7/6, 8/15, 10/1    Wash windows  Wash all windows inside and out

I am wishing to write a query that will pull anything with today's date (today is 7/5) and display just that record.  

So in this example since today is 7/5 I would like to pull just this record even though it has two other dates in it (because this task needs done on multiple dates):
7/5, 7/6, 7/7       Take trash          Remove trash from building

I hope I explained this well enough.  Let me know.

Thank you
Watch Question
Senior Software Engineer
Top Expert 2012
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE