could anyone help me, please ?
Why this query doesn't work ?
SELECT * FROM
(SELECT A.nro AS nro1, A.matric AS matric1,
B.city, D.country
FROM TB01 A, TB02 B, TB03 C, TB04 D
WHERE A.nro = B.nro AND
B.temo1 = C.code AND
C.nro = D.nro AND
A.type = '022' AND C.nomen = 'A1') T1,
(SELECT E.nro AS nro2, E.matric AS matric2,
F.city, H.country
FROM TB01 E, TB02 F, TB03 G, TB04 H
WHERE E.nro = F.nro AND
F.temo2 = G.code AND
G.nro = H.nro AND
E.type = '022' AND G.nomen = 'A2') T2
WHERE T1.nro1 = T2.nro2 AND
AND T1.matric1 = T2.matric2;
(SELECT A.nro AS nro1, A.matric AS matric1,
B.city, D.country
FROM TB01 A, TB02 B, TB03 C, TB04 D
WHERE A.nro = B.nro AND
B.temo1 = C.code AND
C.nro = D.nro AND
A.type = '022' AND C.nomen = 'A1') T1,
(SELECT E.nro AS nro2, E.matric AS matric2,
F.city, H.country
FROM TB01 E, TB02 F, TB03 G, TB04 H
WHERE E.nro = F.nro AND
F.temo2 = G.code AND
G.nro = H.nro AND
E.type = '022' AND G.nomen = 'A2') T2
WHERE T1.nro1 = T2.nro2 AND
AND T1.matric1 = T2.matric2;
I get this error on the WHERE condition:
------------------------------------------------
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "T1". SOME SYMBOLS THAT MIGHT
BE LEGAL ARE: ( . AT MICROSECONDS MICROSECOND SECONDS SECOND MINUTES
MINUTE
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 3 0 0 -1 1161 502 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'00000003' X'00000000' X'00000000' X'FFFFFFFF'
X'00000489' X'000001F6' SQL DIAGNOSTIC INFORMATION
BE LEGAL ARE: ( . AT MICROSECONDS MICROSECOND SECONDS SECOND MINUTES
MINUTE
DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 3 0 0 -1 1161 502 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'00000003' X'00000000' X'00000000' X'FFFFFFFF'
X'00000489' X'000001F6' SQL DIAGNOSTIC INFORMATION
Thanks in advance!
Code'd