-
SAS and ODBC
SAS uses the SAS/ACCESS module and the PROC SQL procedure to access external ODBC data sources. As with
most SAS procedures, there is no point-and-click interface available and all of the steps will have to be accomplished
using the SAS command language. Using PROC SQL, you can access any ODBC data source in SAS.Code from SAS end required to connect with the ODBC
PROC SQL;
CONNECT TO ODBC(DSN='con-Name');/* con-Name : is the ODBC connection name. Connection should be pre established */
CREATE TABLE temp_sas AS
SELECT * FROM CONNECTION TO ODBC( SELECT * FROM tab-Name );
QUIT;/* Inside the ODBC( ) you can write complex queries instead of single table query shown above*/