BookmarkSubscribeRSS Feed
Smitha9
Fluorite | Level 6

Hi,

I have a SQL code and I havent worked on SQL before.

Can I run the SQL code in SAS? Are there any rules to run?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

You can run PROC SQL or PROC FEDSQL in SAS.

 

But your question is very vague. Can you please show us the code you have?

--
Paige Miller
Reeza
Super User

Not necessarily. SQL isn't a single language and most SQL implementations have their own functions. Basic queries such as Select * will run fine in any system however, MS SQL creates tables using INTO for example, while many others use CREATE TABLE. 

 

So you will very likely need to do some code conversion.

 

SAS does offer SQL Pass through, where it takes your SQL code and passes it directly to a server though. In that case, it will run as is. 

 


@Smitha9 wrote:

Hi,

I have a SQL code and I havent worked on SQL before.

Can I run the SQL code in SAS? Are there any rules to run?


 

tarheel13
Rhodochrosite | Level 12

you can use proc sql. but it is important to note that proc sql isn't fully SAS and isn't fully SQL either. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 944 views
  • 0 likes
  • 4 in conversation