sql - Incorrect syntax near '.'. While Update a variable table -
i have issue while updating table variable. i've declared it, when run whole query error:
incorrect syntax near '.'.
and can't seem solve issue...
update @list set nrid = case when nrid null t1.nrid else nrid end @list inner join table1 t1 on @list.pnr = t1.pnr inner join table2 t2 on t1.n nrpnr = t2.nrpnr t1.pnr = t2.pnr , t2.isactive = 0
update list set list.nrid = t1.nrid @list list inner join table1 t1 on list.nrid = t1.nrid inner join table2 t2 on t1.nrid = t2.nrid t1.nrid = t2.nrid , t2.isactive = 0
as mentioned in comments inner join remove nulls in case
Comments
Post a Comment