tag:blogger.com,1999:blog-18371456.post8737759257581389831..comments2024-03-26T00:07:20.400-05:00Comments on The Db2 Portal Blog: INTERSECT and EXCEPT [DB2 9 for z/OS]Craig S. Mullinshttp://www.blogger.com/profile/17077237739217901780noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-18371456.post-85868467545886096492010-02-18T11:51:07.360-06:002010-02-18T11:51:07.360-06:00In one of my projects, i have used the INTERSECT c...In one of my projects, i have used the INTERSECT command to get: Lets say no of customers who stays in different geographies. For testing purpose, DB2 query was created consisting of 20 INTERSECTS. This has resulted in DB2 error code as Query very complex and didnt get executed. Is there any other command which would improve the performance of the above query.Unknownhttps://www.blogger.com/profile/05155375185435040212noreply@blogger.comtag:blogger.com,1999:blog-18371456.post-27436325137757913092009-01-16T04:14:00.000-06:002009-01-16T04:14:00.000-06:00select colA1,colA2 from stmtA except select colB1,...select colA1,colA2 from stmtA <BR/>except <BR/>select colB1,colB2 from stmtB<BR/><BR/>=<BR/><BR/>select colA1,colA2 from stmtA<BR/>where not exists<BR/> (select * from stmtB <BR/> where (colA1,colA2) = (colB1,colB2))<BR/><BR/>=<BR/><BR/>select colA1,colA2 from stmtA <BR/>where (colA1,colA2) not in <BR/> (select colB1,colB2 from stmtB)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18371456.post-22780674658808851622007-10-15T13:30:00.000-05:002007-10-15T13:30:00.000-05:00how can we mimick the results of an EXCEPT stateme...how can we mimick the results of an EXCEPT statement in an earlier version of DB2Tumbihttps://www.blogger.com/profile/03757669469207830953noreply@blogger.com