Hello, I have an Employee table with the following columns
Emp_id, Emp_Name and Mgr_id.
I'm trying to create a view that will display
Emp_id, Emp_name, Mgr_id and Mgr_name
(by crossing the Employee table). I tried outer join, inner join, etc., but I can't fix it.
Any help is appreciated.
CREATE TABLE [dbo].[tblEmployeeDetails]( [emp_id] [bigint] NOT NULL, [emp_name] [nvarchar](200) NULL, [emp_mgr_id] [bigint] NULL, CONSTRAINT [PK_tblEmployeeDetails] PRIMARY KEY CLUSTERED ( [emp_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
source share