I have a dataset, let say:
A B C
1 1 1 <-------
1 1 2
1 1 3
1 2 1
1 2 2 <--------
1 2 3
1 3 1
1 3 2
1 3 3 <--------
I need only rows having arrow sign assigned to it. Please tell me how can I fetch these rows.
where b=c ;
thanx tom.
but if dataset would be like this then?
A B C
1 1 1 <-------
1 1 2
1 1 3
1 2 1
1 2 2 <--------
1 2 3
1 3 1
1 3 2
1 3 3 <--------
2 4 1 <--------
2 4 2
2 4 3
2 4 4
2 5 1
2 5 2 <--------
2 5 3
2 5 4
basically I got stuck with many to many merge
I do not see any merging as there is only one dataset shown. So what is your criteria? Perhaps you want the first row for the first value of B within a particular value of A and the second row for the second value of B, etc?
data want ;
set have ;
by a b;
if first.a then bnumber=0;
if first.b then cnumber=0;
bnumber+first.b;
cnumber+1;
if cnumber=bnumber ;
run;
tom actually I have two datasets
1 . NewTravelplan
Cardnumber travel_plan_id
xxxxxx7828 4912
xxxxxx7828 5823
xxxxxx8623 4516
xxxxxx8623 5154
xxxxxx8623 5225
xxxxxx2134 4917
above dataset shows card number and travel_plan_id for the new travel plan customer has opted
2. Available_name.
Cardnumber travel_plan_name
xxxxxx7828 travel3
xxxxxx7828 travel5
xxxxxx7828 travel6
xxxxxx7828 travel7
xxxxxx7828 travel9
xxxxxx7828 travel7
xxxxxx8623 travel1
xxxxxx8623 travel2
xxxxxx8623 travel9
xxxxxx8623 travel10
xxxxxx2134 travel4
xxxxxx2134 travel5
above dataset shows the available travel_plan_name which on the given card numbers.
Now I have to assign the unique travel_plan_name to travel_plan which opted on the card.
I hope you understand, what I mean to say.
I need a travel_plan_name from available_name dataset to put in
Taking the first record of "NewTravelplan": What would be the logic to look up "travel_plan_name" in "travel_plan_name"? Which "travel_plan_name" would you add to the data and why?
Cardnumber travel_plan_id travel_plan_name
xxxxxx7828 4912 ????
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.