View Single Post
  #1  
Old July 8th, 2009, 08:57 PM posted to microsoft.public.access
Chuck W[_2_]
external usenet poster
 
Posts: 98
Default Update Query Questions

Hi,
I have a table called AHRQ with a date/time field called DISCHARGEDATE and a
numeric field that is currently blank called DISCHARGEYEAR. The
DISCHARGEDATE field has normal date values (i.e. 6/1/2008). I want to run an
update query that will populate the DISCHARGEYEAR field with the value 2008
if the discharge date is a 2008 date. I keep getting an "Data Type mismatch
in criteria expression" error when I run the following query. I have changed
the format of the DISCHARGEYEAR field from text to numeric but get the same
error. Can someone help?

Thanks,



UPDATE AHRQ SET AHRQ.[DISCHARGEYEAR] = "2008"
WHERE (([DISCHARGEDATE] Between "1/1/2008" And "12/31/2008"));