How to convert a .sql file to a SAS dataset?

I have a .sql file that contains database information. This database has exactly 8 tables. I would like to essentially import the contents of these 8 tables into SAS and create SAS7bdat SAS datasets.

Is there a quick / easy way to do this directly? I apologize in advance for the lack of knowledge in the database!

+4
source share
3 answers

Open your .SQL file with your favorite text editor. You will see the code Create Tableand Insert. You can move them one step PROC SQL. You may need some minor changes to the code, but they should be relatively simple if you have 8 tables, but this is a bit of work.

, , SQL- .

+2

:

  • SQL Server SQL Server
  • .sql SSMS .
  • SAS SQL Server SAS/Connect ( )
  • proc sql, .
0

You need to query the sql database and then forward all the results to sas.
This is the easiest way.

You just need to configure sql and sas, as usual, and write a program that will copy the contents. A database programmer should be easy.

0
source

All Articles