Join trouble
I am facing a problem that I can´t move on:
============================================================================
SELECT tab_principal.name, tab_principal.uniqueid, tab_principal.lastupdate, T1.Chip
FROM traccaroficial.tc_devices AS tab_principal
LEFT JOIN(
SELECT tab1.id as id, tab2.Rastreador as Rastreador, tab3.Chip as Chip
FROM tc_rastreador_x_chip tab1
LEFT JOIN tc_rastreadores tab2
ON tab1.idRastreador = tab2.id
LEFT JOIN tc_chips tab3
ON tab1.idChip = tab3.id
WHERE 1=1
) T1 ON (tab2.Rastreador = tab_principal.uniqueid)
where lastupdate < now() - INTERVAL 2 day ORDER BY lastupdate
============================================================================
I have the error: /* Erro SQL (1054): Unknown column 'tab2.Rastreador' in 'on clause' */
Please, every help is welcome!
Subject
Written By
Posted
Join trouble
August 13, 2019 12:00PM
Sorry, you can't reply to this topic. It has been closed.
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.