Help using Base SAS procedures

join two table

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 118
Accepted Solution

join two table

Hello,

I have two to join

table 1

A     B

1     6

2     8

TABLE2

A     B

3     5

4     6

I want

A     B

1     6

2     8

3     5

4     6


Accepted Solutions
Solution
‎04-20-2015 04:45 PM
Super User
Posts: 10,500

Re: join two table

data want;

     set

          table1

          table2

     ;

run;

You can have many sets appended this way. You can also use lists such as:

data want

     set table: ;

run;

The : says "Use all datasets in the library that start with Table". The order might not be what you want as TableAmuchlongername would come before TableB.

View solution in original post


All Replies
Solution
‎04-20-2015 04:45 PM
Super User
Posts: 10,500

Re: join two table

data want;

     set

          table1

          table2

     ;

run;

You can have many sets appended this way. You can also use lists such as:

data want

     set table: ;

run;

The : says "Use all datasets in the library that start with Table". The order might not be what you want as TableAmuchlongername would come before TableB.

☑ This topic is SOLVED.

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

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