Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-20
7
Medium Priority
?
635 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:MIKE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:zx10r
ID: 21832560
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
 
LVL 17

Author Comment

by:MIKE
ID: 21832655
How...where...can I get the latest OLE DB driver for MySQL..?
0
 
LVL 4

Expert Comment

by:zx10r
ID: 21832763
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 17

Author Comment

by:MIKE
ID: 21832860
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
 
LVL 4

Accepted Solution

by:
zx10r earned 2000 total points
ID: 21832954
use COALSCE

COALESCE(test, 'test is null')
0
 
LVL 17

Author Closing Comment

by:MIKE
ID: 31469211
amazing...Coalesce works totally different in SQL Server...but this worked fine in MySQL...
0
 
LVL 4

Expert Comment

by:zx10r
ID: 21833169
I know, funny how that works.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question