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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.