Could you please help me understand the meaning of the expression below?
REPORTING_DATE <= CASHFLOW_DT >= ACCOUNT_DT
It is a logical expression that is true (1) when CASHFLOW_DT is larger than (or equal to) both of the other variables. Otherwise it is false (0).
It's the same as
REPORTING_DATE <= CASHFLOW_DT and CASHFLOW_DT >= ACCOUNT_DT
@David_Billa wrote:
Could you please help me understand the meaning of the expression below?
REPORTING_DATE <= CASHFLOW_DT >= ACCOUNT_DT
Use it in a WHERE clause and SAS will show you in the LOG how it is interpreted.
1906 data test2;
1907 set test;
1908 where REPORTING_DATE <= CASHFLOW_DT >= ACCOUNT_DT ;
1909 run;
NOTE: There were 1 observations read from the data set WORK.TEST.
WHERE (REPORTING_DATE<=CASHFLOW_DT) and (CASHFLOW_DT>=ACCOUNT_DT);
It is a little unusual to see this construct used when the inequalities point in different directions. Another way to get the same would be something like:
max(REPORTING_DATE,ACCOUNT_DT) <= CASHFLOW_DT
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.