0

I have connected to a sql database using sql pass-through in base SAS 9.4. I pulled the table schema and can clearly see that 'filedate' variable is date type.

However, when i pull a subset of the table in via SAS it converts 'filedate' to the text variable - why is this happening?

This is not duplicate question to SAS Date Formats Incompatible with SQL Server Date as the data originates in an sql server and it is SAS that is interrogating that SQL server via an ODBC connection. Although i admit the solution may involve somehow upgrading/changing the ODBC driver.

thanks.

Community
  • 1
  • 1
Tammboy
  • 321
  • 4
  • 14
  • What version of SQL Server are you running? And, what version of the ODBC driver are you using? I think the version of the SQL ODBC driver matters here. – Joe Aug 24 '16 at 15:48
  • I'm going to mark this as duplicate for now, as I think the answers (both the accepted one and my answer) are the correct answers here. If they're not, please clarify some details here (particularly, as to why you're certain the usage note in my answer in the linked Q is not applicable). – Joe Aug 24 '16 at 15:50
  • The ODBC driver is 32 bit - version 6.01.7601.17514. – Tammboy Aug 24 '16 at 15:54
  • SQL server is: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) – Tammboy Aug 24 '16 at 15:56
  • ODBC driver is old, and is the issue here - update that (per my answer in the other question). You should be using version 10 or newer I believe. – Joe Aug 24 '16 at 16:09

0 Answers0