Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

New to Oracle SQL Developer - From SAS

4067301Aug 19 2019 — edited Aug 21 2019

Hi everyone,

I've recently changed job and now use Oracle SQL Developer (Version 4.2), I've got several years experience using SAS and writing Proc SQL, most of my code writing is proving useful but there are a few things where I'm unsure whether or how I can replicate tasks. Any help would be appreciated.

Performing functions during variable production:

For example, taking a day off today's date:

In SAS

%LET udate = today()-1;

In Oracle?

I understand that DEFINE is similar to %LET, but can I perform functions?

DEFINE udate = ?

Second one, I could write a code to then run when called:

%MACRO simple(option);

SELECT

*

FROM table

WHERE id = &option

RUN;

%MEND;

%simple(1);

%simple(2);

This meant that if amendments were required I only needed to do this once. Can I do this?

As I said, any help / tips / resource are appreciated.

Seb

Comments
Post Details
Added on Aug 19 2019
4 comments
893 views