Subject | How select against a sub-select field? |
---|---|
Author | mmenaz |
Post date | 2002-04-17T11:14:18Z |
Hi, I've a query like this:
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'
I get the error "Column does not belong to referenced table." about the 'RIP' condition in the where clause.
Seems that I can not reference that field taht comes from a sub-select. How can I reference it in the Where?
Thanks
Marco Menardi
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'
I get the error "Column does not belong to referenced table." about the 'RIP' condition in the where clause.
Seems that I can not reference that field taht comes from a sub-select. How can I reference it in the Where?
Thanks
Marco Menardi