Guest User

Untitled

a guest
Feb 14th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. if (datediff(day,((select top 1 fec_ven from
  2. cxc_cuedoc inner join cxc_cuedoc cue
  3. on cli.cod_cli = cue.cod_cli where sal_doc !=0 and num_doc=cue.num_doc)),getdate())) > 110 and cue.tip_doc = '010'
  4. begin
  5. update cxc_cliente
  6. set ind_mora ='2'
  7. set IND_JURIDICO = '2'
  8. end
  9. else
  10. begin
  11. set ind_mora ='1'
  12. set ind_juridico ='1'
  13. end
  14.  
  15. update cxc_cliente
  16. set ind_mora = '2',
  17. IND_JURIDICO = '2';
Add Comment
Please, Sign In to add comment