I have a table in database called Employee which has 4 columns namely

  • EmployeeID EmployeeName Designation Reporting Manager

which gets updated with new details everytime a new record is added in aspx page. EXAMPLE:

EID EMPLOYEE_NAME DESIGNATION REPORTING_MANAGER 1 TIM COOK CEO Null 2 MILLER CTO TIM COOK 3 BRAD COO TIM COOK 4 WILLIAM HRD TIM COOK 5 JOHN TECH MANAGER(DEV) WILLIAM 6 WALLACE TECH MANAGER(TEST) WILLIAM 7 SUNDAR SWIFT DEV JOHN 8 PETER SWIFT DEV JOHN 9 STEVE TEST ENGINEER WALLACE i Want to generate data in table2 from above table(table1) like the one below,

EID EMPLOYEE_NAME REPORTING_MANAGER_ID 1 TIM COOK Null 2 MILLER 1 3 BRAD 1 4 WILLIAM 1 5 JOHN 4 6 WALLACE 4 7 SUNDAR 5 8 PETER 5 9 STEVE 6

Please help me out. Thank in advance.

Related posts

Recent Viewed