if (datediff(day, ((select top 1 fec_ven
from cxc_cuedoc
inner join cxc_cuedoc cue on cli.cod_cli = cue.cod_cli
where sal_doc != 0 and num_doc = cue.num_doc)), getdate())) > 110
and cue.tip_doc = '010'
begin
update cxc_cliente
set ind_mora ='2'
set IND_JURIDICO = '2'
end
else
begin
set ind_mora ='1'
set ind_juridico ='1'
end
I get an error on syntax after the first set... I don't know where the mistake is.
Aucun commentaire:
Enregistrer un commentaire