Excel Data Connection to SQL Anywhere - Ignore Null value eliminated in aggregate function Error

50 Views Asked by At

I am working to bring SQL Anywhere data directly into Excel using an ODBC connector. I am using the Excel -> Data -> Get Data -> From Other Sources -> From ODBC.

The SQL Select query is pretty complex and was developed long ago. I will not try to pretend like its well written. I'm hoping to avoid having to completely reverse engineer it and rewrite portions. It has a lot of aggregate functions (count, max, list, etc).

When I run the query, excel returns this and rejects the query: Details: "ODBC: SUCCESS_WITH_INFO [01003] [SAP][ODBC Driver][SQL Anywhere]Null value eliminated in aggregate function"

This same query works fine in other tools that can ignore the warning. Is there a way to tell Excel to ignore that warning when running the query?

1

There are 1 best solutions below

0
Dan On

Figured it out. Adding this to the top of the query (not the connection string) fixes the issue.

SET ANSINULL OFF