Desktop productivity for business analysts and programmers

Combining columns

Reply
New Contributor
Posts: 2

Combining columns

I want to combine the text of several columns into 1 computed column using SAS Query builder. I can't seem to figure it out :-(

Occasional Contributor
Posts: 10

Re: Combining columns

on Query builder -> Click on "Computed column" -> Click on "New" -> Select "Advanced Expression" -> Type trim(column1)||trim(column2)||trim( column3)
-> click on "next" -> Enter new column name and click on "Finish"

Notes:
1. Column1 to 3 are your columns in your table
2.You can use trim/compress functions based on your choice.
New Contributor
Posts: 2

Re: Combining columns

Thx! It worked!

Trusted Advisor
Posts: 1,059

Re: Combining columns

There are also a number of cat... functions that are great for this kind of thing; cat, catq, cats,catt, catx.

Ask a Question
Discussion stats
  • 3 replies
  • 227 views
  • 0 likes
  • 3 in conversation