Desktop productivity for business analysts and programmers

Appending columns with the same table

Reply
Contributor
Posts: 22

Appending columns with the same table

Hi

I have a table with 2 columns and I want to create a column that contains everything present on those 2 columns.

Ex.  Append column 1 and Column 2 into Column 3.

Column 1Column 2Column 3
128012
157015
206020
255025
80
70
60
50

Any help with this...  I would like to do it in one single query and avoid creating 3 tables to do this.

Thank you

Super User
Super User
Posts: 6,351

Re: Appending columns with the same table

Seems like an extremely strange request.

data want ;

  set have (in=in1)

      have (keep=column2 rename=(column2=column3))

  ;

  if in1 then column3 = column1 ;

run;

Ask a Question
Discussion stats
  • 1 reply
  • 198 views
  • 3 likes
  • 2 in conversation