11-21-2015 05:45 AM
The simplest method is to unload your SQL tables into files with a textual format (CSV or fixed column) and then use a proper data step to import the data into SAS.
11-21-2015 07:57 AM
1) connect to your SQL database within your SAS program using the loginid & password defined in a LIBNAME statement
2) all the SQL tables can be read as SAS files and set using SET statements using the structure "libref.filename".
Alternatively, instead of step 2), you can also use a proc sql to create a SAS file from "CREATE TABLE " syntax reading the SQL Table.
Either one should bring you the data.
11-21-2015 06:53 PM
What does your environment look like?
Are you able to connect to the SQL server via SAS at all - and have you done this before meaning is the environment already set-up?
If the environment is already set-up and there is a libname statement pointing to the SQL server then you can use tables in the database for reading as if they were SAS tables.
11-23-2015 02:14 PM
thx for all response.
It can be that the problem is in connection between my SAS acount (at the school) and SQL db. I simplican not to connect to the server.