error previo -2147217900 - AI Invalid column name 'PONTEVEDRA'.select distinct e.id, e.nombre, e.apodo2, e.idTanatorio, tanatorio,p.ayuntamiento,e.provincia,p.lugar,e.fechaF from v_Esquelas_actos_esp_mobile e, poblaciones p where e.IdPobFallecimiento=p.idpob and ((exists (select * From iglesias i where i.id = e.idIglesia and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From iglesias i where i.id = e.idIglesia2 and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From tanatorios i where i.id = e.idTanatorio and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From nombre n where n.idFuneraria = e.idFuneraria and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From poblaciones p where p.idPob = e.idPobFallecimiento and (provincia in ('PONTEVEDRA') or ayuntamiento in (''))) or exists (select * From esquelas_publicaciones p where p.idEsquela=e.Id and idDominio in (5)))) and idPobFallecimiento in (select idPob from poblaciones where (1=1 and idpro=PONTEVEDRA and idcon=Sanxenxo)) and isnull(tipo,'')='' and tanatorio is not null and e.acto in ('Velación','Apertura Velación','Velatorio en') and e.fechaPublicacion=convert(datetime,convert(varchar,getdate(),103),103) UNION select distinct e.id, e.nombre, e.apodo2, e.idTanatorio, tanatorio,p.ayuntamiento,e.provincia,p.lugar,e.fechaF from v_Esquelas_actos_esp_mobile e, poblaciones p where e.IdPobFallecimiento=p.idpob and ((exists (select * From iglesias i where i.id = e.idIglesia and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From iglesias i where i.id = e.idIglesia2 and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From tanatorios i where i.id = e.idTanatorio and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From nombre n where n.idFuneraria = e.idFuneraria and (provincia in ('PONTEVEDRA') or poblacion in (''))) or exists (select * From poblaciones p where p.idPob = e.idPobFallecimiento and (provincia in ('PONTEVEDRA') or ayuntamiento in (''))) or exists (select * From esquelas_publicaciones p where p.idEsquela=e.Id and idDominio in (5)))) and idPobFallecimiento in (select idPob from poblaciones where (1=1 and idpro=PONTEVEDRA and idcon=Sanxenxo)) and isnull(tipo,'')='' and tanatorio is not null and e.acto in ('Velación','Apertura Velación','Velatorio en') and exists (select * from v_Esquelas_actos_esp_mobile e2 where e.id=e2.id and e2.fecha>=convert(datetime,convert(varchar,getdate(),103),103)) order by e.provincia, e.nombre