Alias issue

Results 1 to 2 of 2

Thread: Alias issue

  1. #1
    Maurice PH Hendriks Guest

    Default Alias issue

    I have two aliases, T1 and T2. T1 works fine. T2 doesn&#039;t; error= &#039;Error 1032: Cannot use column prefix &#039;T2&#039;. This must match the object in the UPDATE Clause &#039;tblAviationODUD&#039;. Can&#039;t figure out why.<BR><BR>UPDATE <BR> tblAviationODUD<BR>SET<BR> T2.ODCountry = T1.ODCountry<BR>FROM<BR> tblTempAviationDCP AS T1, tblAviationODUD AS T2<BR>WHERE<BR> T1.Dates = T2.Dates

  2. #2
    Join Date
    Dec 1969

    Default I think it's because...;re updating tblAviationODUD and then you alias the same table. Try this instead:<BR><BR>UPDATE tblAviationODUD<BR>SET tblAviationODUD.ODCountry = T1.ODCountry<BR>FROM tblTempAviationDCP AS T1, tblAviationODUD<BR>WHERE T1.Dates = tblAviationODUD.Dates<BR><BR>Oliver.

Posting Permissions

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