1

I´m having some troubles connecting an Excel sheet with a view through the ODBC.

The structure of the view is more or less this:

CREATE OR REPLACE
    ALGORITHM = UNDEFINED 
    DEFINER = usr 
    SQL SECURITY DEFINER
VIEW my_view AS
SELECT DISTINCT 
   a, 
   b, 
   c
FROM 
   table 1
WHERE 
   condition 1
UNION ALL
SELECT DISTINCT 
   a, 
   b, 
   c
FROM 
   table 2
WHERE 
   condition 2
UNION ALL
SELECT DISTINCT 
   a, 
   b, 
   c
FROM 
   table 3
WHERE 
   condition 3

Everything okay with the ODBC connection to Excel. But, when I replace UNION ALL by UNION (because I don´t want to get duplicates) the connection fail and the error message is on the following picture:

enter image description here

How can it be possible? Is anything wrong with the structure of my query?

Thanks a lot in advance for any info you can provide :)

AdN
  • 161
  • 1
  • 10

0 Answers0