Archives of the TeradataForum

Message Posted: Thu, 18 Apr 2002 @ 12:19:50 GMT

Are the following queries doing the same thing and shouldn't they return the same results??? Because they don't ,but I think they
should. Can anyone shed some light on this for me, please help!!

Thanks, Tony.

First Query (returns two rows)
SELECT B1.AQBICLS
FROM CPCLMA.QCLMA001 A1,
(
SELECT AQBICLS,AFVCPRO
FROM CPCLMB.QCLMB001
WHERE ASEIXXX IN ('02024640948','01620099028')
AND AFVCPRO IN ('87620','87621','87622')
) B1
WHERE A1.AQBICLS=B1.AQBICLS
Second Query (returns no rows)
SELECT B1.AQBICLS
FROM CPCLMA.QCLMA001 A1,
(
SELECT AQBICLS,AFVCPRO
FROM CPCLMB.QCLMB001
WHERE ASEIXXX IN ('02024640948','01620099028')
) B1
WHERE B1.AFVCPRO IN ('87620','87621','87622')
AND A1.AQBICLS=B1.AQBICLS