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

Update Query

Status
Not open for further replies.

fatstu

Technical User
Feb 22, 2002
20
US
Can someone help me set up this query. table_x has 4 fields
Date (date/time), Cust ID(number), count_1(number) and
count_2(number). Typically for each day a cust will have a
record and have the 2 count fields filled with assorted
numbers.

Ive been trying update a one of the count fields for one
particular customer with records after 26/08/02. I.e IF
Cust_Id=199 and date>26/08/02 THEN change count_1 to 0
ELSE leave as.

Cant figure it out, can anyone help?
 
Something like this should work (dates need to be in american format and surrounded by hashes (although Access will sort that out for you if you use the qbe grid)

update table_x
set count_1 =0
where Date >#8/26/02#
and Cust ID =12344555666'replace with your customer id

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top