New to MySQL and getting an error on OpenSource SQL query from SQL 2000


This SQL Server 2005 script:

select * from openquery (MYREMOTEMYSQLSERVER,
'select clientid, client_status_dt from client')

Gives me this error:

OLE DB error trace [Non-interface error:  Column 'client_status_dt' (compile-time ordinal 2) of object 'select clientid, client_status_dt from client' was reported to have a DBCOLUMNFLAGS_ISNULLABLE of 0 at compile time and 32 at run time].
Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'OleMySql.MySqlSource.1' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

When I select certain columns such as CLIENTID which is NEVER NULL...then I get the column of data, however if I request data from a column that contains NULLS...I get the above error.

What can I do to prevent the error and get my data?

I'm using MS SQL Server 2005 on SQL 2000 DBs accessing....MySQL on a UNUNTU LINUX box. I do have access to the LINUX server using MySQL SQL Browser,...however I was just trying to see if I can get data returned from my MS SQL SERVER Management Studio program.

LVL 17
MIKESoftware Solutions ConsultantAsked:
Who is Participating?
zx10rConnect With a Mentor Commented:

COALESCE(test, 'test is null')
check this thread out

Also, make sure you are using the latest OLE DB driver for MySQL
MIKESoftware Solutions ConsultantAuthor Commented:
How...where...can I get the latest OLE DB driver for MySQL..?
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

MIKESoftware Solutions ConsultantAuthor Commented:
Isn't there a way to tell the query to place a blank or a ZERO or something in the field...IF...the field is NULL..??

In SQL Server it is this:


What is this in MySQL...?
MIKESoftware Solutions ConsultantAuthor Commented:
amazing...Coalesce works totally different in SQL Server...but this worked fine in MySQL...
I know, funny how that works.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.