More on this issue: It seems that these exceptions do not depend on the data, and occur on empty tables. I attached two examples. To reproduce with them first run these queries: create table table2 ("Customer" varchar(50), "Product" varchar(50), "Cost" int, "PurchaseDate" timestamp); create table table3 ("Customer" varchar(50), "Product" varchar(50), "Cost" int, "PurchaseDate" timestamp); create table "dTable_Product" (key int, value varchar(50)); create function create_date (y int, m int, d int) returns date external name mtime.date; Example 1: A query that throws the union exception (the shortest one I could reproduce with): http://old.nabble.com/file/p26421515/Example1_withError.txt Example1_withError.txt The same query with one less OR clause. This one works fine and returns 0 rows: http://old.nabble.com/file/p26421515/Example1_works.txt Example1_works.txt Example 2: A much longer query with simpler OR clauses that throws the same exception: http://old.nabble.com/file/p26421515/Example2_withError.txt Example2_withError.txt The same query with one less OR clause. This one works fine and returns 0 rows: http://old.nabble.com/file/p26421515/Example2_works.txt Example2_works.txt This was tested on Windows 64 bit with Aug-SP1. Please advise. Thanks. -- View this message in context: http://old.nabble.com/strange-UNION-exception-tp26421401p26421515.html Sent from the monetdb-users mailing list archive at Nabble.com.