Subject How put conditions upon a sub-select field?
Author mmenaz
Hi, I've a query like this (FB 1.0):
SELECT PIANO_CONTI.ESERCIZIO_ID,
PIANO_CONTI.CONDOMINIO_ID,
PIANO_CONTI.CONTO_ID,
PIANO_CONTI.DESCRIZIONEDISP,
(SELECT RIPARTITO FROM PIANO_CONTI SSPC WHERE (SSPC.ESERCIZIO_ID=OPC.ESERCIZIO_ID) ) RIP
FROM PIANO_CONTI OPC
WHERE RIP='S'

and I get the error "Column does not belong to referenced table" referred to the "RIP='S'" part.
How can I refer to that field? It shown as "RIP" if I run the query, but adding the Where clause I get that error.
Thanks
Marco Menardi