Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2012
    Posts
    126

    Unanswered: Someone please tel me why this update query isn't giving me the right results

    Im trying to update my tblEmployeeDetails email_address from my ademail table (data i snagged from the exchange server) Here is my sql


    UPDATE ademail INNER JOIN tblEmployeeDetails ON ademail.[Full_Name] = tblEmployeeDetails.Full_Name SET ademail.Email_Address = [tblEmployeeDetails].[Email_Address];


    It shows its going to update 300ish records but then when I look at my tblemployeedetails table the email address are still blank and the email addresses on ademail are now blank.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Your SQL does not match your description. The SQL updates ademail, not tblEmployeeDetails.
    Paul

  3. #3
    Join Date
    Aug 2012
    Posts
    126
    Quote Originally Posted by pbaldy View Post
    Your SQL does not match your description. The SQL updates ademail, not tblEmployeeDetails.
    I thought that was the case. I swapped it around and it shows 300ish blank fields its going to update.

    It should be this right?


    UPDATE ademail INNER JOIN tblEmployeeDetails ON ademail.[Full_Name] = tblEmployeeDetails.Full_Name SET tblEmployeeDetails.Email_Address = [ademail].[Email_Address];
    Last edited by Syrch; 09-07-12 at 20:45.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Isn't that what it's supposed to do; update blank fields?
    Paul

  5. #5
    Join Date
    Aug 2012
    Posts
    126
    Quote Originally Posted by pbaldy View Post
    Isn't that what it's supposed to do; update blank fields?
    It is, i guess i thought it would show what the update was going to be not what it was going to be before. But now I think about it...its right. It shows you whats going to be updated which in my case were blank fields. Thanks for helping out

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problem.
    Paul

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    If you ran that query in post #1 then running the revised query will be futile unless you have a new copy of the file from exchange server
    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
  •