server/sources/rql2sql.py
changeset 340 bfe0e95571aa
parent 339 c0a0ce6c0428
child 438 69b79faefa94
--- a/server/sources/rql2sql.py	Wed Jan 07 09:47:56 2009 +0100
+++ b/server/sources/rql2sql.py	Wed Jan 07 14:55:16 2009 +0100
@@ -488,7 +488,10 @@
                 sql.insert(1, 'FROM (SELECT 1) AS _T')
             sqls.append('\n'.join(sql))
         if select.need_intersect:
-            return '\nINTERSECT\n'.join(sqls)
+            if distinct:
+                return '\nINTERSECT\n'.join(sqls)
+            else:
+                return '\nINTERSECT ALL\n'.join(sqls)
         elif distinct:
             return '\nUNION\n'.join(sqls)
         else: