Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- update cxc_cliente
- set ind_mora = '2',
- IND_JURIDICO = '2';
Add Comment
Please, Sign In to add comment