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