SELECT  codePrestataireNormalise AS id, l.libelle AS libelle,
l.codeLocalite AS commune,prt.libelle AS prestataire,adresseGeo AS situation,
CASE WHEN (prt.telephonePortable IS NOT NULL OR prt.telephonePortable='') THEN prt.telephonePortable  ELSE prt.telephoneFixe END AS contact,
CASE WHEN prt.latitude IS NOT NULL THEN latitude ELSE '0.000000' END AS latitude,
CASE WHEN prt.longitude IS NOT NULL THEN longitude ELSE '0.000000' END AS longitude ,prt.conventionne
FROM prestataire prt 
INNER JOIN `typeprestataire` b ON (b.codeTypePrestataire=prt.codeTypePrestataire) AND prt.actif=1
INNER JOIN localite l ON (l.codePays=prt.codePays AND l.codeVille=prt.codeVille AND l.codeLocalite=prt.codeLocalite)
WHERE prt.libelle NOT LIKE "%HORS%"
AND prt.actif=1
AND prt.conventionne=1 AND prt.codeTypePrestataire='PHA'
-- and l.libelle like '%ABOBO%'
AND prt.libelle LIKE '%EUREKA%'
AND prt.codePrestataire NOT IN ('CE0416','PR1176','CE1215','CE1232','PR1175','CE1276')
ORDER BY l.codeLocalite,b.codeTypePrestataire ;