Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    remove table/query aliases (2003)

    I have a database where some of the tables/queries in a query have been aliased. How do I remove the alias – or at the very least see through an alias to find out what it refers to – right clicking the table/queries in design view and selecting properties doesn’t give me this information ( the source field is blank), though I would have thought it should – certainly this article seems to suggest so?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: remove table/query aliases (2003)

    The Source property is only used if the table resides in an external database.

    Open a query in design view.
    Select View | SQL

    Here is a simple example:

    SELECT Cat.strCategoryName, Prod.strProductName
    FROM tblCategories AS Cat INNER JOIN tblProducts AS Prod ON Cat.pkeyCategoryID = Prod.fkeyCategoryID;

    The query is based on two tables whose "real" names are tblCategories and tblProducts. Their aliases are Cat and Prod. As you see, the keyword AS is used to specify the alias.

    To get rid of the aliases, you'd have to edit the SQL strings, taking care to replace the alias with the original name in expressions such as Cat.strCategoryName.

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: remove table/query aliases (2003)

    Brilliant - thanks for that. ( I won't be re-editing the SQL - It was already making my eyes glaze over!!!) <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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