BookmarkSubscribeRSS Feed
Nono
Calcite | Level 5

Hi Fam

 

Please assist, I need to automate the date for a simple SQL procedure that I am running. I am currently able to do it for a data step but it becomes very tricky ones I try to link in another data set. See below code:

 

%macro data(time,time1);

proc sql;

create table fsr.CORE_&time. as

select a.* ,b.Client_Default as NPL_&time1., b.CNACTUAL as Exposure&time1.

from fsr.CORE_&time. a left join core_all.Core_impairments5_&time1. b

on a.Account_Number = b.Account_Number;

quit;

%mend data;

rsubmit;

%data(1501,1502);%data(1501,1503);%data(1501,1504);%data(1501,1505);%data(1501,1506);%data(1501,1507);%data(1501,1508);%data(1501,1509);%data(1501,1510);%data(1501,1511);%data(1501,1512); %data(1501,1601);

endrsubmit;

rsubmit;

%data(1502,1503);%data(1502,1504);%data(1502,1505);%data(1502,1506);%data(1502,1507);%data(1502,1508);%data(1502,1509);%data(1502,1510);%data(1502,1511);%data(1502,1512);%data(1502,1601); %data(1502,1602);

endrsubmit;

2 REPLIES 2
Kurt_Bremser
Super User

PS Always make it a point to post the log when SAS code does something unexpected. Use the {i} icon, so that the text formatting (and all characters) are preserved. The main posting window can (and will) do funny things with code and/or log text.

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 752 views
  • 0 likes
  • 2 in conversation