• also, i think you had your joins backwards...

    this seems to show me everything correct:

    /*SuperVisorManager1Manager2

    ramNULLNULL

    surehramNULL

    vimalsurehram

    */

    CREATE TABLE [#Employee](

    [EmpID] [int] NOT NULL,

    [EmpName] [varchar](50) NOT NULL,

    [SupID] [int] NULL)

    GO

    INSERT INTO [#Employee] (EmpID, EmpName, SupID) VALUES (1, 'ram', 2)

    INSERT INTO [#Employee] (EmpID, EmpName, SupID) VALUES (2, 'sureh', 3)

    INSERT INTO [#Employee] (EmpID, EmpName, SupID) VALUES (3, 'vimal', null)

    SELECT

    SuperVisors.empname SuperVisor,

    Managers.empname Manager1,

    SubManagers.empname Manager2

    FROM [#Employee] SuperVisors

    LEFT OUTER JOIN [#Employee] Managers

    ON Managers.SupID = SuperVisors.EmpID --vimals id is someone elses supervisor id

    LEFT OUTER JOIN [#Employee] SubManagers

    ON Managers.EmpID = SubManagers.SupID

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!