SELECT T1.A, T1.B, T1.C, X.XCNT, Y.YCNT FROM T1, (SELECT COUNT(*) XCNT FROM T2 WHERE T2.A=T1.A
AND (T2.E=1 OR (T2.E=0 AND MEV_T2.D=1))) AS X,
(SELECT COUNT(*) YCNT FROM T2 WHERE T2.A=T1.A
AND (T2.D=0 OR (T2.D=1 AND T2.E=1))) AS Y
WHERE MYDATE <='2002-10-15'
When running this query I get the message
"Invalid column name 'T1.A'."
Can anyone help me?
AND (T2.E=1 OR (T2.E=0 AND MEV_T2.D=1))) AS X,
(SELECT COUNT(*) YCNT FROM T2 WHERE T2.A=T1.A
AND (T2.D=0 OR (T2.D=1 AND T2.E=1))) AS Y
WHERE MYDATE <='2002-10-15'
When running this query I get the message
"Invalid column name 'T1.A'."
Can anyone help me?