BookmarkSubscribeRSS Feed
strsljen
Obsidian | Level 7

Hi,

 

I would like to utilize Oracle sequence to get unique number within set of DI jobs running within the same flow.

 

Could you reccommend the best way to utilize it within SAS DI?

 

Basically I run:

SELECT
ORACLE_SCHEME.MY_SEQUENCE.NEXTVAL
FROM
DUAL

 

Thanks!

Best regards,
 

--
Mario
1 REPLY 1
Patrick
Opal | Level 21

@strsljen

Some explicit pass-through code as below should do the job. Using DIS I'd implement this as a custom transformation for re-usability.

select put(seq_no,z16. -l) into :seq_no
from connection to ora
  (
    SELECT
       ORACLE_SCHEME.MY_SEQUENCE.NEXTVAL as seq_no
    FROM
       DUAL
  );

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 834 views
  • 2 likes
  • 2 in conversation