I'm trying to select data from Bigquery to SQL Server, using a linked server with ODBC with Simba driver.
我正在尝试使用带有ODBC和Simba驱动程序的链接服务器从Bigquery到SQL Server中选择数据。
Environment:
- Microsoft SQL Server 2012 (SP1) - 64 bit
- Simba Driver 64 bit
Microsoft SQL Server 2012(SP1) - 64位
Simba Driver 64位
Some datatypes are returned ok (INTEGER, TIMESTAMP, BOOLEAN) but STRING does not get returned.
某些数据类型返回ok(INTEGER,TIMESTAMP,BOOLEAN)但不返回STRING。
The error is:
错误是:
OLE DB provider "MSDASQL" for linked server "BQ" returned message "Requested conversion is not supported."
链接服务器“BQ”的OLE DB提供程序“MSDASQL”返回消息“不支持请求的转换”。
And this is the query:
这是查询:
select <column_name>
from [linked_server].[projectId].[dataset].[table]
I tried configuring the Server Options~> Collation Compatible to True, but still the same. like suggested here
我尝试将服务器选项〜>整理兼容配置为True,但仍然相同。喜欢这里的建议
Thanks in advance for any help!
在此先感谢您的帮助!
1 个解决方案
#1
1
[SOLVED] When creating the ODBC connection, under Advanced Options, there is a field named "Default String Column Length". MSSQL can't handle over 8000 characters but the initial value over there is 65535. changing it to 4000, for example, solved the issue.
[已解决]创建ODBC连接时,在“高级选项”下,有一个名为“默认字符串列长度”的字段。 MSSQL无法处理超过8000个字符,但其初始值为65535.例如,将其更改为4000可解决此问题。
Thanks!
#1
1
[SOLVED] When creating the ODBC connection, under Advanced Options, there is a field named "Default String Column Length". MSSQL can't handle over 8000 characters but the initial value over there is 65535. changing it to 4000, for example, solved the issue.
[已解决]创建ODBC连接时,在“高级选项”下,有一个名为“默认字符串列长度”的字段。 MSSQL无法处理超过8000个字符,但其初始值为65535.例如,将其更改为4000可解决此问题。
Thanks!