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

Experts:

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.

thanks
M
LVL 17
MIKESoftware Solutions ConsultantAsked:
Who is Participating?
 
zx10rConnect With a Mentor Commented:
use COALSCE

COALESCE(test, 'test is null')
0
 
zx10rCommented:
check this thread out http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_20856262.html

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

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

 
zx10rCommented:
0
 
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:

isnull({fieldname},0)

What is this in MySQL...?
0
 
MIKESoftware Solutions ConsultantAuthor Commented:
amazing...Coalesce works totally different in SQL Server...but this worked fine in MySQL...
0
 
zx10rCommented:
I know, funny how that works.
0
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.