I am using driver version 3.3.0 17-Aug-23.
When I try to select the Name column from the Calendar object and the Name column is NULL, the driver gives me the following error.
SELECT * FROM OPENQUERY ([SF_CPQ_PROD],'SELECT Id, Name FROM Calendar');
An unexpected NULL value was returned for column "[MSDASQL].Name" from OLE DB provider "MSDASQL" for linked server "SF_CPQ_PROD". This column cannot be NULL.
Selecting just the Id column works - so it does not seem to be an issue on the Salesforce side?
SELECT Id FROM OPENQUERY ([SF_CPQ_PROD],'SELECT Id, Name FROM Calendar');
I use OPENQUERY() since that actually filters the data on the Salesforce/SOQL side, whereas a direct SELECT will work, but takes WAY longer as it seems to download all the records to the machine the ODBC driver is installed on and takes a LOT longer (like 10x depending on the table). We are syncing some tables to a SQL Server data warehouse so I need this to run much more efficiently using OPENQUERY().
This query uses the fully qualified name and does work, but I can't use this for most tables as it's too slow and does all the filtering on the local machine.
SELECT Id, Name FROM [SF_CPQ_PROD]...Calendar;
Any idea why this is happening? We have plenty of other objects with fields containing NULL values, it's only with the Name column ...
Thanks!