Results 1 to 2 of 2
  1. #1
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73

    inserting values in column based another column

    Dear All



    I have a table having a column of Date of Birth. another column named Date of Retirement. Now I want to create an update query that fills the column date of retirement by adding 60 in year of Date of Birth.

    I have 1200 record in my table so I want to fill it by query.

    Please help me.

    Thanks.


    Wasim

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Wasim,

    Generally speaking, it is a bad idea to store derived values in a database table. If the retirement date is always at the employee's 60th birthday, and if you already store the birth date, then the best practice is to not store the retirement date, and instead calculate it on demand.

    Also, it is a bad idea to put spaces in field names (or table, query, form, or report names, for that matter).

    If you still want to do this:

    UPDATE YourTable
    SET [Date Of Retirement] = DateAdd("y", 60, [Date Of Birth])

Please reply to this thread with any new information or opinions.

Similar Threads

  1. individual records in same column on form
    By Sharron in forum Forms
    Replies: 0
    Last Post: 10-04-2008, 09:05 PM
  2. centre justify column text
    By marky in forum Access
    Replies: 0
    Last Post: 09-01-2008, 12:02 PM
  3. split a column into two seperate columns
    By nybanshee in forum Access
    Replies: 2
    Last Post: 08-14-2008, 04:52 PM
  4. 2 different fields into 1 column by query?
    By rainxking in forum Queries
    Replies: 1
    Last Post: 06-04-2006, 09:37 AM
  5. Added items in a column.
    By Wrangler in forum Forms
    Replies: 3
    Last Post: 03-25-2006, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums