DATA Step, Macro, Functions and more

Cannot merge two excel files

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Cannot merge two excel files

I have two files that I am trying to merge using the variable Address. I am trying to do this in University Edition but the log shows that the merging is not possible by address. Below is my code and screenshot of the log

 

libname orion "/folders/myfolders/project";
proc sort data= orion.fullerton_edited out=orion.fullerton_edited1;
by Address;
proc sort data= orion.agent1line out=orion.agent1line1;
by Address;
merge orion.fullerton_edited1 orion.agent1line1;
by Address;
run;


1.png

Accepted Solutions
Solution
‎02-23-2017 06:13 PM
PROC Star
Posts: 308

Re: Cannot merge two excel files

Posted in reply to ayushupadhyay22

libname orion "/folders/myfolders/project";
proc sort data= orion.fullerton_edited out=orion.fullerton_edited1;
by Address;
proc sort data= orion.agent1line out=orion.agent1line1;
by Address;

 

data WANT; <------- You're missing this 
merge orion.fullerton_edited1 orion.agent1line1;
by Address;
run;

View solution in original post


All Replies
Solution
‎02-23-2017 06:13 PM
PROC Star
Posts: 308

Re: Cannot merge two excel files

Posted in reply to ayushupadhyay22

libname orion "/folders/myfolders/project";
proc sort data= orion.fullerton_edited out=orion.fullerton_edited1;
by Address;
proc sort data= orion.agent1line out=orion.agent1line1;
by Address;

 

data WANT; <------- You're missing this 
merge orion.fullerton_edited1 orion.agent1line1;
by Address;
run;

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 120 views
  • 0 likes
  • 2 in conversation