Instructions
1. Open SQL Server Management Studio from the group "SQL Server" program in the Windows menu. Log into the database server to which you want to import SAS data.2. Click the icon "Linked Server" in the properties of the database tree in the left pane. Click "New" and then "Linked Server". A configuration window opens.
3. Select the OLE server SAS controller in the dropdown menu. For example, if your database contains SAS data using the MS SQL engine, select "MS SQL" drop-down menu. Enter your username and password and the name of the database for the SAS base. Click "OK" to create the connection.
4. Export data from your SAS server to the MS SQL server. The following code uses the SQL "Select in" option to retrieve the data from the "orders" table from a SAS server and push it to the MS SQL server: select into imported_orders (select * from sas.database.orders) Replaces "sas" with the name of the SAS server and replace "database" with the name of the SAS database from which you want to import the data.