[英]Query in Linked Mysql server
嗨,我已将我的MYSQL服务器(172.xx.xx.xx)链接到我的sql服务器。 但是在使用查询时会提供错误。
select * from OPENQUERY ([MYSQL],'select * from example.address_table limit 10')
此查询工作正常,但在执行以下查询时却出现以下错误:-
select * from OPENQUERY ([MYSQL],'select * from example.address_table
where (create_date between '2015-01-01 00:00:00' and '2015-01-31 23:59:59') or
(modified_date between '2015-01-01 00:00:00' and '2015-01-31 23:59:59');
如何解决链接服务器中的查询。
这是错误
字符串')后的引号引起来
鉴于您的错误,这应该是解决办法
select * from OPENQUERY ([MYSQL],'select * from example.address_table
where (create_date between ''2015-01-01 00:00:00'' and ''2015-01-31 23:59:59'') or
(modified_date between ''2015-01-01 00:00:00'' and ''2015-01-31 23:59:59'')');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.