MySQL Forums
Forum List  »  General

Re: Doubt on a query
Posted by: Eduardo Luis
Date: February 22, 2021 03:02AM

Hi, first of all, thank you for helping...

Actually, I got this error:
Unknown column 'id_utente' in 'from clause'

The complete SELECT should be like this:

update Ficha_Cliente f join ( select id_utente, max(data) as lastday from Calendario WHERE presente=1 AND activo=1 AND id_cliente=9263 AND data<='2021-02-21' group by id_utente) c using(id_utente) set f.ultima_presenca = c.lastday;

I don't understand.

Options: ReplyQuote


Subject
Written By
Posted
February 19, 2021 09:11AM
February 19, 2021 12:23PM
Re: Doubt on a query
February 22, 2021 03:02AM
February 22, 2021 03:13AM
February 22, 2021 11:03AM
February 22, 2021 11:09AM
February 22, 2021 09:33PM
February 23, 2021 06:48AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.