BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Alan
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

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

4 REPLIES 4
FriedEgg
SAS Employee

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.

Reeza
Super User

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.

SASKiwi
PROC Star

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.

Alan
Calcite | Level 5

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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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