DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    melb Guest

    prefixes with same name


    Hello,

    I 've got a question;
    I want to know whether it is possible to use two prefixes with the same name
    in one FROM statement.


    Thanks,

    Melb

  2. #2
    D. Patrick Hoerter Guest

    Re: prefixes with same name

    melb,

    Do you mean use a table or view twice?

    If so:

    Assume this table:
    CREATE TABLE MyTable
    (
    CustomerID int NOT NULL,
    ReferrerID int NOT NULL,
    CompanyName int NOT NULL
    )

    SELECT
    Table1.CompanyName AS ReferrerCompanyName,
    Table2.CompanyName
    FROM
    MyTable AS Table1
    INNER JOIN MyTable AS Table2 ON
    Table2.ReferrerID = Table1.CustomerID

    Regards,
    D. Patrick Hoerter

    melb <boau7158@exact.nl> wrote in message news:3a6dae86$1@news.devx.com...
    >
    > Hello,
    >
    > I 've got a question;
    > I want to know whether it is possible to use two prefixes with the same

    name
    > in one FROM statement.
    >
    >
    > Thanks,
    >
    > Melb




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links