当我执行此存储过程时,出现错误:
Msg 213,Level 16,State 7,Line 1
列名或提供的值数与表定义不匹配。
代码:
size_t
答案 0 :(得分:0)
从cmd查询中删除'*',然后选择#result表中的那些列。
答案 1 :(得分:0)
也许,您可以选择要插入的明细列。您可以更改此代码:
select * from Employee_SalaryDetails
where SalaryId in( SELECT max(SalaryId) FROM Employee_SalaryDetails group by EmpId)
代码:
select SalaryId, EmpId, TakenSalary, AvailSalary FROM Employee_SalaryDetails
where SalaryId in( SELECT max(SalaryId) FROM Employee_SalaryDetails group by EmpId)