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

IF statements

Status
Not open for further replies.

astrevens

Technical User
Aug 8, 2001
36
GB
Nice simple one but i cant get me head round it.
What i want to do is IF the field [pr_Discount]=Y then add 30% to the field [pr_Cost]. All this in one query if poss
 
Do an update query with criteria set for the pr_Discount field to "Y" and the Update to box for the pr_Cost field set to [pr_Cost]*1.3 Have fun! :eek:)

Alex Middleton
 
BTW, the SQL for this query would be:

UPDATE Table1 SET Table1.pr_Cost = [pr_Cost]*1.3
WHERE (((Table1.pr_Discount)=True));
Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top