BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ramgem
Calcite | Level 5

I have a data table that consists of customers  ID's and their telephone numbers in the following manner:

Customer IDtelephone number

5550

9613456789
55509613657894
67589611567854

Which function enables me to have the following format :

Customer IDtelephone number 1telephone number 2
555096134567899613657894
67589611567854.

Thank you in advance for all your help

1 ACCEPTED SOLUTION

Accepted Solutions
Loko
Barite | Level 11

Hello,

data have;
input Customer_ID  telephone_number $;
datalines;
5550 9613456789
5550 9613657894
6758 9611567854
;

proc transpose data=have out=want(drop=_name_) prefix=Telephone;
by Customer_ID;
var telephone_number;
run;

View solution in original post

3 REPLIES 3
RamKumar
Fluorite | Level 6

Have a look at proc transpose.

Loko
Barite | Level 11

Hello,

data have;
input Customer_ID  telephone_number $;
datalines;
5550 9613456789
5550 9613657894
6758 9611567854
;

proc transpose data=have out=want(drop=_name_) prefix=Telephone;
by Customer_ID;
var telephone_number;
run;

Ramgem
Calcite | Level 5

Thank you that was very helpfull

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1610 views
  • 3 likes
  • 3 in conversation