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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.