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

Multiple Update Commands based on different criteria in the one query

Status
Not open for further replies.

NLucy

Programmer
Aug 6, 2004
3
IE
I have a table of values and they have a date field. The date field values are 1-12, these relate to a period in the fiscal year. I want to create another column and assign the correct month in each row by looping through with the following criteria:
1 = 04
2 = 05
3 = 06 etc.
I can do this with seperate update queries but how do I put all the queries together like an IF THEN ELSE statement. I have tried CASE statements and Subqueries, neither have worked.
Any ideas would be greatly appreciated.
 
Something like this ?
IIf(Month([your date field])<10, Month([your date field])+3, Month([your date field])-9)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top