Combining two tables with different no. of columns

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

Combining two tables with different no. of columns

Hi all,

 

I am having problem in combining two tables with different no. of columns.

compare_y1y1dbeta
11111100
1115000
11117201
1113700
11163901
1112000

 

 

compare_y2y2d1beta1
818100
8124001
8183101
8125601
8189001
815770

1

 

Now if I type command:

 

data table3;
                 set tabel1 table2;
                 run;

 

 I dont have the table3 I want.

 

Any help i can have table3 like this?

 

compare_y1y1dbetacompare_y2y2d1beta1
11111100818100
11150008124001
111172018183101
11137008125601
111639018189001
11120008157701

 

 


Accepted Solutions
Solution
‎03-12-2018 06:19 AM
PROC Star
Posts: 1,836

Re: Combining two tables with different no. of columns

Are you looking for one to one merge?

 

data want;

set table1;

set table2;

run;

or

 

data want;

merge table1 table2;

run;

View solution in original post


All Replies
Solution
‎03-12-2018 06:19 AM
PROC Star
Posts: 1,836

Re: Combining two tables with different no. of columns

Are you looking for one to one merge?

 

data want;

set table1;

set table2;

run;

or

 

data want;

merge table1 table2;

run;

Contributor
Posts: 27

Re: Combining two tables with different no. of columns

Posted in reply to novinosrin
Many thanks Proc Star. Much appreciated
☑ This topic is solved.

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

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