How to create .sql file by using SAS ?

Reply
Contributor
Posts: 56

How to create .sql file by using SAS ?

Hi all,

can you please anyone share me the details for How to create .sql file by using SAS ? need an unrgent ?????

greatly appreciated if I get the details asap..

Thanks

Shiva

Super Contributor
Posts: 334

Re: How to create .sql file by using SAS ?

Posted in reply to shivakrishna

You can write sql code in SAS to access / manipulate data, but since every database has it own flavor of SQL there is no guarantee that code that runs in SAS will directly run in another platform.

I think you need to explain better what you are trying to do.

EJ

Super User
Posts: 19,851

Re: How to create .sql file by using SAS ?

Posted in reply to shivakrishna

Are you talking about .sql files that are SQL code files

or

.sql files that contain data?

Contributor
Posts: 56

Re: How to create .sql file by using SAS ?

yes, .sql files that contain data.

Contributor
Posts: 56

Re: How to create .sql file by using SAS ?

Posted in reply to shivakrishna

actually I'm facing problem is; I have a data with 50 crore observations and 1200 variables.

in one VM having the SAS 9.2 tool another VM having the sql server 2008. there is no VM having the both tools that is the big thing to upload data into sql server.

I want to upload the 50 crore sas dataset into sql server.

I tryed with .dbf format but is not accepting that much of huge data in sql server showing error  error.jpg

could you please provide need full solution for this.

regards

Shiva

Super User
Posts: 5,434

Re: How to create .sql file by using SAS ?

Posted in reply to shivakrishna

There are several options.

The easiest require that you have some kind of (extra?) SAS licenses:

With SAS/ACCESS to OLEDB or ODBC, you can probably access the SQL Server directly.

With SAS/SHARE together with SAS/SHARE*NET you can access SAS from SQL Server using ODBC.

A third, more "manual" approach is to export your SAS data to format that SQL Server can import. To proceed on this path, talk to some SQL Server DBA/experts at your site and let them help you to specify the file format and create any import procedure.

Data never sleeps
Super User
Posts: 19,851

Re: How to create .sql file by using SAS ?

Posted in reply to shivakrishna

This is one of the few cases where I suggest you separate your file into separate files, say 50x10 million each or even 500*1 million each and then import then into SQL Server using SSIS. Whatever method you use, the main bottleneck is going to be network speed and moving those files around.

LinusH solution of connecting directly to the SQL server is the best. This is a maybe a distant tenth, but very easy to implement.

Ask a Question
Discussion stats
  • 6 replies
  • 281 views
  • 0 likes
  • 4 in conversation