【发布时间】:2011-10-24 06:32:45
【问题描述】:
我正在 SAS 中运行 SQL 传递查询。
当我在我的 32 位 WinXP 机器上运行它时,最终 SAS 表中的日期字段是数字。
当我在我的 64 位 Win7 机器上运行它时,最终 SAS 表中的日期字段是字符。
有没有其他人遇到过这个问题?如何让 64 位版本始终返回数字(最好在迁移环境时不更改代码)?
谢谢 抢
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 并修复它。
【问题讨论】:
标签: sql-server windows-7 64-bit odbc sas