Skip navigation links

MySQL Forums :: Connector/ODBC :: Connector 5.1 64 -Bit w/ SQL Server Linked Server


Advanced Search

Connector 5.1 64 -Bit w/ SQL Server Linked Server
Posted by: Chris Candido ()
Date: April 23, 2012 06:16AM

I'm encountering an error when using MySQL as a linked server to SQL Server. Specifically, the problem has to do with NULL comparisons; NULL columns are not being evaluated as such.

When I run the following query on SQL Server 2008 R2,

SELECT T1.*
FROM
OPENQUERY(MySQL,'SELECT Name, Email, Id FROM supply') T0
INNER JOIN Suppliers.dbo.supply T1 ON T0.Id=T1.Id
WHERE( T1.Name!=T0.Name OR T1.Email !=T0.Email ) COLLATE DATABASE_DEFAULT

It will not return mismatched results, even when one is NULL and the other has a value on the local and remote servers. This is between SQL Server and MySQL; but still - NULL is NULL.

While I am trying to determine what the problem is, I was hoping maybe there is a setting the connector I am overlooking somehow.

Thanks

Options: ReplyQuote


Subject Written By Posted
Connector 5.1 64 -Bit w/ SQL Server Linked Server Chris Candido 04/23/2012 06:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.