A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Update Querry



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2005, 09:53 PM
reneabesmer
external usenet poster
 
Posts: n/a
Default Update Querry

Hiii dear friends i have a problem with update Querry i have a table that has
many fields but Date_Of_Birth and Bonus are two fields of them. so in
Date_Of_Birth i have obviously different dates of birth of the people and i
want to give bonus 200 to all those people whose age is less then or equal to
25 years. Example
Date_Of_Birth Bonus
1-Jan-1978
23-Apr-1988
4-Mar-1973
12-Sep-1980

date is writen in the above pattern so plz help me . i will be thankful.

  #2  
Old July 3rd, 2005, 12:59 AM
John Spencer (MVP)
external usenet poster
 
Posts: n/a
Default

First of all, have you considered what to do when the person reaches 26. Does
the bonus stay?

Second, you didn't specify the age as of any specific date.

SELECT Date_Of_Birth,
Bonus: IIF(Date_Of_Birth DateAdd("yyyy",-25, Date()),200,Null)
FROM YourTable



reneabesmer wrote:

Hiii dear friends i have a problem with update Querry i have a table that has
many fields but Date_Of_Birth and Bonus are two fields of them. so in
Date_Of_Birth i have obviously different dates of birth of the people and i
want to give bonus 200 to all those people whose age is less then or equal to
25 years. Example
Date_Of_Birth Bonus
1-Jan-1978
23-Apr-1988
4-Mar-1973
12-Sep-1980

date is writen in the above pattern so plz help me . i will be thankful.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Since Windows update - error sending non-email item (meeting Invit dmatishak General Discussion 2 July 8th, 2005 06:02 PM
Office Update Failure - Apparent Cause Charlie Tame General Discussion 0 April 21st, 2005 03:06 AM
Office Update function doesn't update the Outlook '03 junk email f Marty S General Discussion 0 March 31st, 2005 03:51 AM
Update Query - daily update of 31 fields (each day of month) Frank F. Running & Setting Up Queries 2 December 15th, 2004 01:25 AM
Can't update TOC programmatically (but it worked yesterday) Kathleen Tables 9 July 12th, 2004 01:33 PM


All times are GMT +1. The time now is 08:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.