hi,
I have a query with a WHERE and HAVING clause in MySQL Query Browser everything works correctly but the same query performed in scriptcase me the following error:
Errore durante l?accesso alla banca dati:
Unknown column ‘pag_valal’ in ‘having clause’
select count(*) from watleti as wa LEFT OUTER JOIN wmovfin as wm on wa.id_atleta=wm.id_link LEFT OUTER JOIN wcorsi_a as wh on wh.id_atleta=wa.id_atleta LEFT OUTER JOIN wcorsi_h as wc on wc.id_corso_h=wh.id_corso_h where wa.id_azienda=1 and (wm.caumov=3 or isnull(wm.caumov)) and (wc.id_stagione=1 or isnull(wc.id_stagione) ) and wa.stato=1 group by wh.id_atleta having (pag_valal < date_add(CURDATE(), INTERVAL 5 day) OR isnull(pag_valal))
there is a problem with the use of HAVING and alias?