?
Solved

Querying Datefield from MSSQL LINKED From MySQL

Posted on 2008-10-23
3
Medium Priority
?
705 Views
Last Modified: 2012-06-27
I have MSSQL and MySQL Linked together. This is a temporary solution. What I can't do is pull the date field from MySQL into SQL Server.

Query:
SELECT * FROM openquery(LINK, 'SELECT entry_date,territory  FROM thstew_orders.oetable_backup')

MySQL Data Type for DATE FIELD = DATE

Error Message I receive:
Msg 8114, Level 16, State 8, Line 1
Error converting data type DBTYPE_DBTIMESTAMP to datetime.

what can I do?

Thanks,
Jeff
0
Comment
Question by:jseaman12
[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
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
Marten Rune earned 2000 total points
ID: 22785665
MySQL is not my bag of tea but...

You could modify the field in SQL to varchar(30) or something like that and then you will see what you are getting. In order to convert this string to date, I can surely help, just paste what you get in the varchar field.

/Marten
0
 

Author Comment

by:jseaman12
ID: 22792375
Marten,

I ended up resolving the issue with a solution I figured out. Something called QA. It seems that the end users have entered in incorrect date formats such as 0007 as the year. That's why MSSQL couldn't figure it out.

Thanks for your support.

-Jeff
0
 

Author Closing Comment

by:jseaman12
ID: 31509175
It turned out that the data needed to be QA. The solution would have worked if the QA wasn't the problem.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

777 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