ODBC issue with SQL-Server date field when migrating from XP32 to Win7 64
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.
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.
精彩评论