Hello team.
I would like and appreciate your help with an inquiry regarding a SQL statment that is retrieving all the records and not the max value of this specific record wanted.
Below i write you the sql sentence waiting in your side.
SELECT son.CCTCONTACTO_ID,
son.CCTREGCONTACTO\_ID,
son.CORREOELECTRONICO,
son.ID,
son.NOMBRE,
son.NUMEROTELEFONO,
son.ROBO\_ID,
ton.DESCRIPCION,
ton.ID AS ID1
FROM CONTACTO son, CCTCONTACTO ton
WHERE (son.ROBO_ID=8786 AND son.CCTCONTACTO_ID = ton.ID AND ton.DESCRIPCION = 'REPORTE') AND (son.ID=(SELECT MAX(ID) FROM CONTACTO WHERE ID=son.ID));
Regards.
