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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a role of dates

Status
Not open for further replies.

mcallaghan

IS-IT--Management
Mar 22, 2005
43
0
0
US
I have to create a 14 day list of records.

09/17/2014 09/16/2014 09/15/2014 09/14/2014 etc....

Sometimes the field will have records in it. So the data will display

09/17/2014 09/16/2014 09/14/2014

But none is displaying [highlight #EF2929]09/15/2014[/highlight] because nothing happened on this day. I do have to display the 09/15/2014.

Any help will be great
 
Hi mcallaghan,

Do you have a sample of the query that you are using? Depending on how you are doing it, it may just be to use an outer join, or to use a case when gathering the results.
 
Is there another table that contains dates for every day?

If you have (or create) that, then the easy solution is to make it the primary table and left outer join your table to it on the date.
 
If you do not have another table that contains dates for everyday as Charliy mentioned, you can create an excel file with a column containing all the dates you need and do as Charliy suggested. This most probably won't work if your report has to run within another application.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top