mardi 14 février 2017

ORACLE-Why WHERE clause is not working on UNION?

Vote count: 0

I am working on oracle 11g.But when I add WHERE clause in UNION of two table it shows error:

ORA-00904: "T8"."ENTRY_DATE": invalid identifier

This is my query:

SELECT * FROM
(
    SELECT T1.OUTLET_ID,T1.STATUS,T1.ENTRY_DATE  FROM T_ORDER_DETAIL T1 
    UNION 
    SELECT T8.OUTLET_ID,T8.REASON,T8.ENTRY_DATE FROM  T_NON_PRODUCTIVE_SALES T8 
) 
WHERE T1.OUTLET_ID = T8.OUTLET_ID AND T1.ENTRY_DATE = T8.ENTRY_DATE

Where's the problem?

asked 19 secs ago

Let's block ads! (Why?)



ORACLE-Why WHERE clause is not working on UNION?

Aucun commentaire:

Enregistrer un commentaire