Date: Wed, 17 Nov 2004 13:09:14 -0500
Reply-To: "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Subject: Re: How to break out Patient Full Name into Last,
First and Middle Name
Content-Type: text/plain; charset="us-ascii"
You will have to use the SCAN FUNCTION.
Last= Scan(patient_nm,1,',');
first= Scan(patient_nm,2,',');
MI= Scan(patient_nm,3,',');
The commas will be the delimiters .
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of s
huynh
Sent: Wednesday, November 17, 2004 12:53 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: How to break out Patient Full Name into Last, First and Middle
Name
Hi,
Can anyone help me separate the following PATIENT_NM
variable into FIRST_NM, LAST_NM, and MIDDLE_NM fields?
I want it to look like this:
LAST_NM FIRST_NM MIDDLE_NM
LARSON LARREE E
PATIENT_NM
LARSON,LARREE,E,
CHAVES,DOROTHY,I,
MAYERS,BURNELL,,
DUGGS,JOHNNIE,,
SCOTT,LAURY,E,
HUMPHREY,BALTHA,J,
LUDLOWE,ROBERTO,K,
HIGH,ROSEI,V,
KNOX,JACQUIE,N,
Thank you in advance for your help.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
|