MySQL Forums
Forum List  »  Newbie

Mismatch or data overflow on MySQL Link Server
Posted by: Efthimios Malagrakis
Date: June 08, 2018 06:15AM

I try to insert some records to my remote MySQL from my SQL Server. The MySQL is connected as Link server.

The script I run is:

INSERT INTO OPENQUERY(LINKSERVER1,'select virtuemart_category_id, category_name, category_description, metadesc, metakey, CustomTitle, slug, ERPCode from rszcf_virtuemart_categories_el_gr')
(virtuemart_category_id, category_name, category_description, metadesc, metakey, CustomTitle, slug, erpcode)
SELECT AA1, Category_Name1, Category_Description1, Metadesc1, Metakey1, CustomTitle1, slug1, ERPCode1 FROM EGM_WEB_Categories_el_gr T1
WHERE NOT EXISTS
(
SELECT 1
FROM OPENQUERY(LINKSERVER1,'select virtuemart_category_id, category_name, category_description, metadesc, metakey, CustomTitle, slug, erpcode from rszcf_virtuemart_categories_el_gr') T2 WHERE
T2.erpcode = t1.ERPCode1 collate Greek_CI_AI
)

and always I get this error:

The OLE DB provider "MSDASQL" for linked server "LINKSERVER1" could not INSERT INTO table "[MSDASQL]" because of column "category_description". Could not convert the data value due to reasons other than sign mismatch or overflow.

In MySQL the category_description field is VARCHAR(19000) and in SQL Server it is nvarchar(255).

How can I pass this error? Any help?

Options: ReplyQuote


Subject
Written By
Posted
Mismatch or data overflow on MySQL Link Server
June 08, 2018 06:15AM


Sorry, only registered users may post in this forum.

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.