select * from sqlgeorge2.bdsaint.dbo.deudas_familias where entidad='0' and convert(int,substring(foliodoc,5,2))<=1 and entidad not in ('67482','43524','68128','72559','68306','71625','78905','74853','75248','62669','68985','62537','60275','72664','52396','25933','75671','74403','7411K','77100','70203','44911','60526','64432','50032','60720','48968','76163','39829') Deuda