BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
esbabu
Fluorite | Level 6
I am new to SAS.
Wondering if Sas proc sql supports Sql type transactions
1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

PROC SQL is SAS implementation of the query language.

And yes, SAS itself does not support transactions.

If your data is stored in a RDBMS PROC SQL can make use of som transactional behaviour in the database.

Transactions is mainly useful in OLTP scenarios.

What is your requirement/use case regarding this

Data never sleeps

View solution in original post

4 REPLIES 4
LinusH
Tourmaline | Level 20

PROC SQL is SAS implementation of the query language.

And yes, SAS itself does not support transactions.

If your data is stored in a RDBMS PROC SQL can make use of som transactional behaviour in the database.

Transactions is mainly useful in OLTP scenarios.

What is your requirement/use case regarding this

Data never sleeps
esbabu
Fluorite | Level 6

Thanks @LinusH 
I was actually trying to explore using transaction to commit changes to a table.
By transactions I mean either all or none are committed or written to the table.
Thanks for answering my question.

Tom
Super User Tom
Super User

@esbabu wrote:

Thanks @LinusH 
I was actually trying to explore using transaction to commit changes to a table.
By transactions I mean either all or none are committed or written to the table.
Thanks for answering my question.


A normal data step meets your definition of transactions, the output dataset is only replaced when the data step complete without errors.

 

For example you might want to use the UPDATE statement to apply transactions to an existing dataset.  Note that it does not work in the new CAS environment, only the traditional SAS data step.

 

 

 

 

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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