troubleshooting Question

Filtering for todays date with multiple dates in one field

Avatar of binaryman101
binaryman101Flag for United States of America asked on
Microsoft SQL Server 2005
2 Comments1 Solution314 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Habib Pourfard
Senior Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2012

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros