07-07-2015 04:22 AM
I have the following data:
Number Note Responsible person
1 First Name 2 First Last Name 1
2 First Name 1 First Last Name 2
I would like a program where the result is the following data:
Number Note Responsible person New responsible person
1 First Name 2 First Last Name 1 First Last Name 2
2 First Name 1 First Last Name 2 First Last Name 1
Can anyone at least point me towards which functions I can use?
I have tried arrays without any luck.
07-07-2015 06:39 AM
Sorry, you will need to clarify your problem somewhat. post test data in the form of a datastep, and required output. How is New responsible person arrived at because from the test data you have given:
Will give that response.
07-07-2015 06:49 AM
thanks for your replies.
new_responsible_person=note will only give the First name.
What I need is a list of "Responsible persons" and when the First Name in Note finds a match in that list, it takes the First AND Last Name and puts it into a new list.
07-07-2015 06:56 AM
Yes, still not clear. Maybe you want something like a lookup table:
FIRST_NAME RESP_PERSON NEW_RESP_PERSON
Abc Abc Abc Def
If so then you could do it many ways (merge, join, hash) or if smaller data then:
create table WANT as
(select cats(FIRST_NAME," ",LAST_NAME) from LOOKUP where A.FIRST_NAME=FIRST_NAME) as NEW_RESP_PERSON
from HAVE A;
07-07-2015 07:19 AM
How do I make it more clear?
I'm not used to datasteps as I use Enterprise Guide so what I was looking for was just a pointer on where to get started, which you gave me above, but am I not allowed to ask questions of that "type" here?
07-07-2015 07:48 AM
>What I need is a list of "Responsible persons" and when the First Name in Note finds a match in that list, it takes the First AND Last Name and puts it into a new list.
You have to try harder. As stated, your goal is not clear. Give complete explanations and examples. The above sentence is too vague.