- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was sent .sql files which I need to work on, but I don't know how to open them - when I went to the import wizard I didn't see a ".sql" file option. I was searching on the internet and it was saying that I need to connect to the sql server (if I understood correctly) but I don't have any such thing on my computer. Is there a way for me to import these files?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would guess that the file is merely a text file that contains a sql querry to some database. It would only be useful if it contained the link to the database and you had access to that database. You should be able to view the querry using any text editor (e.g., notepad)
Art, CEO, AnalystFinder.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi art297,
Indeed I was able to open the file with notepad and so instructions as well as raw data. I tried the suggestions below but it won't work. I personally don't have the original data and I don't have SQL, so I guess that the only option is for the sender to export the data in csv form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Most probably it is an SQL dump. It contains essentially SQL statements (create table, insert into...).
If you put the contents of the file inside a PROC SQL; and QUIT; you have some chances that you can run it.
But also possible, that you have to edit this code.
A "supported way" to import such a file is to import it with a native tool (Oracle and maybe MySQL and PostgreSQL support this), then access that database with the appropriate SAS Access engine. Or make an export to a text file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
.sql files are the SQL equivalent of SAS .sas program files. It may be that they contain data in text form (like a SAS data step with datalines), and are therefore more or less self-sufficient to create data.
Open the file with a text editor, copy/paste to SAS and see what you can do.