SAS Tutorial | How to Concatenate Values in SAS

preview_player
Показать описание
When combining data from two or more columns, you have options. For number values, you can use the SUM function. For character values, there are various CAT functions available. In this SAS How To Tutorial, SAS’ Andy Ravenna shows you the older way to perform concatenation and a newer method using some nifty CAT functions. Andy also explains how to use a handy shortcut: SAS variable lists.

Chapters
00:00 – Welcome
01:29 – How to combine data using newer concat functions??
05:49 – Older way to perform concatenation using double vertical bars
07:04 – CATX function
11:58 – Shortcut: Variable lists

Download the Data and get the Code
See SASHELP data sets in SAS

Learn more about SAS Software

SAS Documentation

SUBSCRIBE TO THE SAS USERS YOUTUBE CHANNEL #SASUsers #LearnSAS

ABOUT SAS
SAS is a trusted analytics powerhouse for organizations seeking immediate value from their data. A deep bench of analytics solutions and broad industry knowledge keep our customers coming back and feeling confident. With SAS®, you can discover insights from your data and make sense of it all. Identify what’s working and fix what isn’t. Make more intelligent decisions. And drive relevant change.

CONNECT WITH SAS
Рекомендации по теме
Комментарии
Автор

Hey everyone! Thanks for checking out my video on concatenation. I got an email from SAS Technical Support that pointed out one inaccuracy. In my very first example, even though it *looks* like there is a space between "Age:" and the persons age, it actually got trimmed out by the CATS function. If you *really* want a blank space after "Age:" you could use just the CAT function like this: combo = cat(trim(name), ', Age: ', age); This example uses the trim function to get rid of any extra blanks in the name, but respects the one after "Age:". Enjoy! -Andy

andyravenna
Автор

Thank you. Very help full. I was laughing when you said no dog

negusuworku
Автор

good video i learned a lot thanks hank

savannah
Автор

This is excellent, Andy! I am glad you did this tutorial.

rogerward
Автор

Great video. Thanks. Love the extra tips at the end.

Mgilsy
Автор

I hope you enjoy learning about the CAT function (while seeing some other cats!) Please do let me know if you have any comments or questions. Thanks! Andy

andyravenna
Автор

How would I run the same query when I want to keep all the columns of the said file and Add the additional concatenated column in the same file

sagarkothari
Автор

How would you put together two vars - one has the numeric value of 99 and the other contains numeric vals of (1, 2, 3, etc.) I want the new var to be 99.01 or 99.02 etc.

ToOpenseven
Автор

Hi Andy, thanks for this video. I found it very helpful. Please, I need your help to solve a problem I had after I concatenated "Lastname, first name and middle name. I want middle initials. e.g., Johnson, Smart B. However, I was successful doing that but I have two different people in different departments with the names (e.g., Smith, Johnson L maybe in English dept and another person bearing the same Smith, Johnson L in French Dept). Please how can I solve this problem before joining the data set?

oluwafemijohnson
Автор

Hey Andy, great video. But I have a question, how can I do when I have a character like this: $390, 000? Regrets from Mexico

bailandoasolas
visit shbcf.ru