Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Unanswered: Updating a column in 1 table with value from another column in another table ...

    Hi all.

    This is looking like a brain fart day ... For whatever reason, I'm unable to costruct a 1 shot query to update a column in 1 table with a corresponding value from another table matching on a common ID in a 3rd column ... Ex:

    DepartmentID. Have this column in Table X. Have also UserID for each record.

    Have Table Y with UserID AND DepartmentID. Need to put the corresponding DepartmentID of Table Y into each record of Table X (departmentID) where the UserIDs match ...

    And as always ... Access 2000

    Any ideas?

    Thanks!
    Back to Access ... ADO is not the way to go for speed ...

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    Code:
    UPDATE TableX INNER JOIN TableY ON TableX.UserID = TableY.UserID
    SET TableX.DepartmentID = [tabley].[departmentID];
    I think this should do the job.
    ghozy.

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by ghozy
    Code:
    UPDATE TableX INNER JOIN TableY ON TableX.UserID = TableY.UserID
    SET TableX.DepartmentID = [tabley].[departmentID];
    I think this should do the job.
    Did the trick ... Thanks Ghozy ... (I just could not get my brain to set this up)
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    that hapens to me alot. especialy after a hard work day. I usualy take it as sign to go out and take some fresh air.
    ghozy.

Posting Permissions

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