Help using Base SAS procedures

PROC SQL run MS SQL 2005 stored procedures without MS SQL

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

PROC SQL run MS SQL 2005 stored procedures without MS SQL

Can SAS PROC SQL run Microsoft SQL 2005 stored procedures without relying on Microsoft SQL?  The SAS SQL Pass-Through Facility requires a database with procedure objects in it and I assume an instance of MS SQL running.

Assuming no database objects existed in MS SQL 2005 or even if there was no instance of MS SQL Server, can SAS run SQL stored procedures?

It would need to use MS SQL commands like declare, fetch, exec, begin transation and others.

Before rewriting a SAS solution I wanted to check if we could just copy our stored procedures and run them as is.

Thanks


Accepted Solutions
Solution
‎12-07-2011 02:48 PM
Super User
Posts: 3,106

Re: PROC SQL run MS SQL 2005 stored procedures without MS SQL

Also there is no equivalent functionality in SAS SQL that is similar to the row by row control available in MS SQL stored procedures.

If you do not have Microsoft SQL Server, would I be correct in assuming you would be storing your data in SAS datasets anyway?

If this is the case then you could completey re-engineer what the MS SQL stored procedures are doing using the SAS DATA step to get the row by row control required.

View solution in original post


All Replies
Trusted Advisor
Posts: 1,300

PROC SQL run MS SQL 2005 stored procedures without MS SQL

No, SAS cannot interperet stored procedures written for Microsoft SQL Server natively.  The pass through facility relys on the dbms existing and having the objects there.

Super User
Posts: 17,829

Re: PROC SQL run MS SQL 2005 stored procedures without MS SQL

No, but you should be able to call a stored procedure using the pass through facility and then read or import the results into SAS.

IMO SQL can do most things that SAS can do, unless you're doing statistical analysis, then SAS is the tool that you'd want.

Solution
‎12-07-2011 02:48 PM
Super User
Posts: 3,106

Re: PROC SQL run MS SQL 2005 stored procedures without MS SQL

Also there is no equivalent functionality in SAS SQL that is similar to the row by row control available in MS SQL stored procedures.

If you do not have Microsoft SQL Server, would I be correct in assuming you would be storing your data in SAS datasets anyway?

If this is the case then you could completey re-engineer what the MS SQL stored procedures are doing using the SAS DATA step to get the row by row control required.

New Contributor
Posts: 2

PROC SQL run MS SQL 2005 stored procedures without MS SQL

Thanks for the replies everyone.  So I'll start reengineering it in SAS.  Thanks.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 232 views
  • 6 likes
  • 4 in conversation