Hi,
I would like to know how to connect to dual from sas to obtain next value.....
I tried
proc sql;
connect to oracle as oralib ( path='XXXX' authdomain="XXXX");
create table seq as select * from connection to oralib (
SELECT s_id.nextval as seqval
from dual );
disconnect from oralib;
quit;
I am getting the following error ERROR: ORACLE prepare error: ORA-02289: sequence does not exist. SQL statement: SELECT s_id.nextval as seqval from dual.
Please guide on how to proceed in this regard.
The "sequence does not exist" error usually is telling you that the Oracle sequence (s_id) either has not been created or the user ID you are using to access it doesn't have permission in Oracle to access it. I don't see anything wrong with your Proc Sql code.
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!
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.