- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody,
Is there any way to import a .bak file of SQL Server into SAS?
Thanks in advance.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
IIRC it's usually a txt file that has the code to create the data set.
Open it as a text file using your favorite text editor (NotePad++ etc).
The code usually doesn't won't translate directly into SAS but the conversion to SAS SQL should be relatively straightforward.
Python can read it directly without converting.
You can use Python within SAS Viya so that's another option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
.bak files are often automatically created backups when a file is changed, so it is necessary to know how the orignal file is structured or what type it is. Then you'll know if you can use proc import or if you can write a data step according to the specifications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you don't want to use a direct connection with SAS/ACCESS (to RDBMS or via ODBC), then you are better off by exporting from SQL Server to a text-based format like csv, and reading with a data step.
Parsing a proprietary format will be very hard, if possible at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
IIRC it's usually a txt file that has the code to create the data set.
Open it as a text file using your favorite text editor (NotePad++ etc).
The code usually doesn't won't translate directly into SAS but the conversion to SAS SQL should be relatively straightforward.
Python can read it directly without converting.
You can use Python within SAS Viya so that's another option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I might be wrong, but I didn't know SAS created .bak files of any kind.
What is/was the file originally? Has someone changed the extension as part of a backup routine, or is this a file created by a SAS utility as part of an underlying backup routine?