本文介绍了如何从表生成数据到另一个表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在数据库中有一个名为Employee的表,它有4列,即 * EmployeeID * EmployeeName *指定 *报告经理 每次在aspx页面中添加新记录时都会更新新的详细信息。 示例: EID EMPLOYEE_NAME指定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希望从上表生成如下表所示的表格, 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彼得5 9 STEVE 6 请帮帮我。 提前感谢。解决方案 I have a table in database called Employee which has 4 columns namely*EmployeeID*EmployeeName*Designation*Reporting Managerwhich gets updated with new details everytime a new record is added in aspx page.EXAMPLE:EID EMPLOYEE_NAME DESIGNATION REPORTING_MANAGER1 TIM COOK CEO Null2 MILLER CTO TIM COOK3 BRAD COO TIM COOK4 WILLIAM HRD TIM COOK5 JOHN TECH MANAGER(DEV) WILLIAM6 WALLACE TECH MANAGER(TEST) WILLIAM7 SUNDAR SWIFT DEV JOHN8 PETER SWIFT DEV JOHN9 STEVE TEST ENGINEER WALLACEi Wish to generate a table from above table like the one below,EID EMPLOYEE_NAME REPORTING_MANAGER_ID1 TIM COOK Null2 MILLER 13 BRAD 14 WILLIAM 15 JOHN 46 WALLACE 47 SUNDAR 58 PETER 59 STEVE 6Please help me out.Thank in advance. 解决方案 这篇关于如何从表生成数据到另一个表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-11 10:51