View Single Post
 
Old November 16th, 2007, 07:15 AM
Neal Neal is offline
Friend of Wrox
Points: 718, Level: 10
Points: 718, Level: 10 Points: 718, Level: 10 Points: 718, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: Ennis, Clare, Ireland.
Posts: 131
Thanks: 10
Thanked 0 Times in 0 Posts
Default Append Query (Dates)

Hi,

I have a 'dbo_Week_Commencing' table which contains 3 columns:

ID (Long) Primary Key
Date (Short Date)
Week Commencing (Short Date)

The 'Date' field contains sequential records by date.
The 'Week Commencing' field contains records where the 'Date' column FirstDayOfTheWeek is Sunday.

For Example:
Code:
ID     Date         Week Commencing
6631    20/12/2009    20/12/2009
6632    21/12/2009    20/12/2009
6633    22/12/2009    20/12/2009
6634    23/12/2009    20/12/2009
6635    24/12/2009    20/12/2009
6636    25/12/2009    20/12/2009
6637    26/12/2009    20/12/2009
6638    27/12/2009    27/12/2009
6639    28/12/2009    27/12/2009
6640    29/12/2009    27/12/2009
6641    30/12/2009    27/12/2009
6642    31/12/2009    27/12/2009
6643    01/01/2010    27/12/2009
6644    02/01/2010    27/12/2009
The above extraction shown the last 14 (2 week) records in the table.
Note the 1st and 8th rows contain the Sunday (FirstDayOfTheWeek) for both the 'Date' and 'Week Commencing' Columns.

Question
How do I write an append query to add another consecutive 365 (1 year) records for both columns?

Thanks in advance,



Neal

A Northern Soul
__________________
Neal

A Northern Soul