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!

Include Weekends when weekends do not exist in my database

Status
Not open for further replies.

Cobby1812

IS-IT--Management
Jun 22, 2006
58
GB
Dear Forum,
I have a datebase that excludes weekends. However I have been asked to create a query that includes weekends to allow for 365 day average of the data.

The small snipet below is the main query to return everything (havent put in a date range as yet). Anyone got any idea's how to do this please.

SELECT EXTRACTDATE, CURRENTACCOUNT FROM CLIENTACCOUNTTRENDS


Many thanks


Mark
 
Hi,

I have worked for many different companies, and all that have had a computer system for business processes, have had a calendar table that defines, for instance, accounting days, accounting months, accounting years, work days, holidays, AND EVERY DAY OF THE WEEK.

You need a table with EVERY DAY OF THE WEEK through an adequate date horizon.

IMNSHO.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Hi,

Check out thread1462-1740899, it shows how to write a query that generates some sort of a calendar.

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top