create table pd_pool_id_mob_le_6_l0_pre as select a.account_no a.level4, a.level3 from monthly.pd_pool_id_&&yymmdd_L0 a, staging.credit_card_account_h_&&yymmdd_L0 b where a.account_no=b.account_no and intck('month', date_card_opened, "&SAMPDATE"d)+1<=7;
what does it mean to select from more than one dataset?
is this an inner join?
You are JOINing the two datasets. (kind of like a MERGE in normal SAS code, but more complicated).
In this case since you are testing if the account numbers match between the two datasets it is like an INNER JOIN.
So you are taking three variables from the "monthly" dataset, but only for the account numbers that are also in the "staging" dataset. You are also filtering on the DATE_CARD_OPENED variable, but the code does not tell us which of two datasets has that variable. (if both have the variable the code will fail for being ambiguous).
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: