Hello,
I have SAS 9.4 M2 and a database on a server with PostgreSQL 12.
We are using a libname with odbc to connect to the server. I can SELECT but I cannot DELETE datat from a table.
options nofmterr; libname db_schema odbc user=**** password=**** datasrc=[database alias in odbc.ini] schema=[schema name] direct_exe=delete; proc sql; /* SELECT WORKS */ select * from db_schema.tbl_blah_error where blah_error_comment LIKE "TEST-1234%"; /* ERROR - CANNOT DELETE */ delete from db_schema.tbl_blah_error where blah_error_id=104680; quit;
Thanks Ksharp! I used a connection and executed the query on the remote server.
However, I had to rewrite some of the queries, because they have correlations to local sas datasets.
SAS does not mandate any ODBC driver.
Ask the PostgreSQL admins which driver they recommend for your needs and install it on the SAS server.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.