MySQL Forums
Forum List  »  General

Linked-Server - SQL Server for MySQL - Variable execution.
Posted by: Claudinei Silva
Date: October 01, 2021 04:13PM

Group

How would you run script 1 without error, where its base would be the same as script 2.
Where in this case it would be running inside a SQL Server, using linked-Server. But then there would be an error. (script 1)


-- script 1

select
*
from
openquery([LINKED_MYSQL],
'
set @dsNome = ''Oi'';

select @dsNome;
'
)


-- script 2

select
*
from
openquery([LINKED_MYSQL],
'
select ''Oi''
'
)

Options: ReplyQuote


Subject
Written By
Posted
Linked-Server - SQL Server for MySQL - Variable execution.
October 01, 2021 04:13PM


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.