Update Query Problem

C

Chad

I have two tables with the following fields:

tblHolidays:
Holiday_Name: The name of a holiday
From_Date: The beginning date of a holiday week
To_Date: The ending date of a holiday week
Point_Value: An integer associated with a specific holiday week

tblDailyValues:
DOW: Contains 365 records for every day in a given calendar
year (e.g.,
1/1/2009 - 12/31/09)
Holiday: This is the field I want to update. It should return
a specific value based on which date range (if any) the DOW falls on
according to tblHoliday.


That being out of the way, here is my current update query:

UPDATE tblDailyValues, tblHolidays
SET tblDailyValues.Holiday = [tbHolidays].[Point_Value]
WHERE ((([tblHolidays].[Begin_Date])<=[tblDailyValues].[DOW]) AND
(([tblHolidays].[End_Date])>=[tblDailyValues].[DOW]));

This is not updating correctly and I have no idea why. Can someone please
shed some light into this?

Thanks in advance,

Chad
 
C

Chad

Nevermind...it was simply a typo on my part referencing the other table...it
is always the little things!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

slow query 1
Calculating Dates 3
Find Missing Date 13
Calculate in report or Query? 3
Calculate # of Hiolidays within a Date Range 1
Parameter Query 8
Update Query 1
Workday calculations for weekends 9

Top