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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.