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. 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 583 views
  • 0 likes
  • 4 in conversation