从 XP32 迁移到 Win7 64 时 SQL-Server 日期字段的 ODBC 问题
我正在 SAS 中运行 SQL 传递查询。
当我在 32 位 WinXP 机器上运行它时,最终 SAS 表中的日期字段是数字。
当我在 64 位 Win7 机器上运行它时,最终 SAS 表中的日期字段是字符。
还有其他人遇到过这个问题吗?如何让 64 位版本始终返回数字(最好在迁移环境时不更改代码)?
谢谢 Rob
proc sql noprint;
connect to odbc as remote (datasrc=xxx);
create table table1 as
select *
from connection to remote
(
select cast(date_created as date) as date,
count(*) as count
from mydb.dbo.mytable
group by cast(date_created as date)
order by date
)
;
disconnect from remote;
quit;
解决方案: 需要安装“SQL Server Native Client 10”。在此处下载 64 位安装:
http://www.microsoft.com/download /en/confirmation.aspx?id=16177
然后使用新驱动程序重新设置 DSN 并修复它。
I am running an SQL pass-through query in SAS.
When I run it on my 32bit WinXP box, the date field in the final SAS table is numeric.
When I run it on my 64bit Win7 box, the date field in the final SAS table is character.
Has anybody else experienced this problem? How can I get the 64bit version to always return numeric (preferably without changes to the code as we are migrating environments)?
Thanks
Rob
proc sql noprint;
connect to odbc as remote (datasrc=xxx);
create table table1 as
select *
from connection to remote
(
select cast(date_created as date) as date,
count(*) as count
from mydb.dbo.mytable
group by cast(date_created as date)
order by date
)
;
disconnect from remote;
quit;
SOLUTION: Needed to install "SQL Server Native Client 10". Download the 64bit installation here:
http://www.microsoft.com/download/en/confirmation.aspx?id=16177
Then re-setup DSNs using that new driver and that fixed it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案:需要安装“SQL Server Native Client 10”。在此处下载 64 位安装:
http://www.microsoft.com/download /en/confirmation.aspx?id=16177
然后使用新驱动程序重新设置 DSN 并修复它。
SOLUTION: Needed to install "SQL Server Native Client 10". Download the 64bit installation here:
http://www.microsoft.com/download/en/confirmation.aspx?id=16177
Then re-setup DSNs using that new driver and that fixed it.