Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011
    Posts
    18

    Unanswered: Column Alias Doesn't Work

    "tblUserInfo.[Full Name] AS Creator" appears as "Full Name" when I run this query. I can use an alias for the other two tables. I tried using an alias for a different field on the tblUserInfo table and it didn't work.

    Thanks in advance.

    Code:
    SELECT tblBomRequestLine.GUID, tblBomRequestLine.TaskID, tblUserInfo.[Full Name] AS Creator, tblBomRequestLine.ProdCode, tblBomRequestLine.[Fixture Description], tblBomRequestLine.[Fixture TYPE], tblBomRequestLine.QTY, tblBomRequestMain.Customer, tblBomRequestMain.Job, tblBomRequestMain.City, tblBomRequestMain.[PO#], tblBomRequestMain.[ORD#], tblBomRequestLine.Created, tblBomRequestLine.CsComment, tblBomRequestLine.EngComment
    FROM (tblUserInfo INNER JOIN tblBomRequestMain ON tblUserInfo.ID=tblBomRequestMain.[Created By]) INNER JOIN tblBomRequestLine ON tblBomRequestMain.Id=tblBomRequestLine.ID
    WHERE (((LenB([tblBomRequestLine].[taskid]))>0))
    ORDER BY tblBomRequestLine.GUID;

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    If memory serves, a caption defined in the table will override an alias. Do you have those set up?
    Paul

  3. #3
    Join Date
    Nov 2011
    Posts
    18
    Thank you! That was it.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problem. You'd think an explicitly declared alias would take precedence, but it doesn't seem to.
    Paul

Posting Permissions

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