Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010

    Unanswered: update field from another field - same table

    Hi there,
    i have a date field that in some fields is showing an incorrect date and i would like to update these to the correct date.
    my table has many columns in it - one being the product column. in this column i can always see the computer products have an incorrect date in the date column and the phone products have the correct date.
    is there a way to search in the product name column (computer) and update the date in that row with the date where the product = phones in a different row?

  2. #2
    Join Date
    Mar 2007
    Does the actual DATA (in this case a date) *only* exist in one table?
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 15
    How do you link a product to a computer?
    Have a nice day!

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    I think the real isssue is providing you can clearly iidentify what the problem is there is almost certainly a way of resolving it this case tis going to be running a bit of SQL that updates the table
    trhe syntax for that is
    UPDATE MyTable Set AColumn=AValue where BColumn=somevalue

    the issue is going to be how you identify the WHERE clause as thats the bit that specifies how you limit the update. if you don't supply a where clause the query will update every row

    so you may need to do a join
    whilst developing your query I'd suggest you use a select in place of the update (until you've refined the query and it does what you require

    select A.AColumn from MyTable as A
    JOIN MyTable as B ON <whatever is common between a computer and phone record>

    in this case the WHERE is replaced by a JOIN clause

    so lets say the way you identify the same products is if the location is the same
    JOIN MyTable as B ON B.Location= A.Location
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts