Hi again, I figured myself. It seems that after RIGHT JOIN order of expressions is important. For example:
SELECT * FROM A RIGHT JOIN B ON A.FID=B.ID AND A.AGE=50 WILL return different results than SELECT * FROM A RIGHT JOIN B ON A.AGE=50 AND A.FID=B.ID The first one should be preffered to the last one. Sorry for disturbing you, Donatas -----Original Message----- From: Donatas Ciuksys [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 4:15 PM To: [EMAIL PROTECTED] Subject: RIGHT JOIN from TEMP table to normal table returns bad results Hello, I'm using MaxDB 7.5.00.15 on WinXP. I have created temporary table using statement like this: CREATE TABLE TEMP.SOME_NAME AS SELECT ... When I execute: SELECT COUNT(SOME_NAME.ID) FROM TEMP.SOME_NAME JOIN OTHER_TABLE ON ... I get correct results. But when I execute with RIGHT JOIN: SELECT COUNT(SOME_NAME.ID) FROM TEMP.SOME_NAME RIGHT JOIN OTHER_TABLE ON ... I get as many rows as there are in table OTHER_TABLE and all of them filled with zeros (0). Is it intended behaviour or something is wrong with database ? Regards, Donatas -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
