sql server 2008 - update using INNER JOIN -
what going wrong in sql statement , can't find wrong
update master_adjust inner join [dbo].[master] on master_adjust.empno = [dbo].[master].empno set master_adjust.gratuityytodate = [dbo].[master].gratuityytodate, master_adjust.manualbasicpay = 0, master_adjust.manualtax = 0, master_adjust.manualnapsa = 0, master_adjust.manualpension = 0, manualcharity = 0
error message
msg 156, level 15, state 1, line 2
incorrect syntax near keyword 'inner'.
looks wrong. try this:
update ma set ma.gratuityytodate = [dbo].[master].gratuityytodate, ma.manualbasicpay = 0, ma.manualtax = 0, ma.manualnapsa = 0, ma.manualpension = 0, manualcharity = 0 master_adjust ma inner join [dbo].[master] on ma.empno = [dbo].[master].empno
Comments
Post a Comment