Extracting first name, last name, middle name from a string

I have a variable in a stored procedure that puts the first
name, last name, and middle name in the format LastName,
FirstName MiddleName. (I cannot just used the columns
firstname, lastname, etc. as they are not available in the
stored proc.) I am trying to split this up so that it reads
LastName, [new line] ~r~n FirstName + MiddleName. Any
suggestions on extracting this into that format?
Any help greatly appreciated.
I am working with Infomaker 6.0 and Windows 2000
Thanks,
Sean
0
Sean
3/23/2004 12:06:33 PM
sybase.infomaker.general 4461 articles. 0 followers. Follow

4 Replies
1287 Views

Similar Articles

[PageSpeed] 23

Actually, it's just the format LastName, FirstName
so I would only need to search for the comma and then ~r for
the first name.
Sean

> I have a variable in a stored procedure that puts the
> first name, last name, and middle name in the format
> LastName, FirstName MiddleName. (I cannot just used the
> columns firstname, lastname, etc. as they are not
> available in the stored proc.) I am trying to split this
> up so that it reads LastName, [new line] ~r~n FirstName +
> MiddleName. Any suggestions on extracting this into that
> format? Any help greatly appreciated.
> I am working with Infomaker 6.0 and Windows 2000
> Thanks,
> Sean
0
Sean
3/23/2004 7:04:48 PM
You can create a computed field on the report.
For lastname:  mid(yourfield, 1, pos(yourfield, ",",1) - 1)
For Firstname: mid(yourfield, pos(yourfield, ",",1) + 1)
Note: if you leave out the 3rd argument from the mid() function, it will
take the remainder of the string.

-- 
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://www.pb9books.com
product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement


<Sean (Update)> wrote in message news:40608a50.3906.846930886@sybase.com...
> Actually, it's just the format LastName, FirstName
> so I would only need to search for the comma and then ~r for
> the first name.
> Sean
>
> > I have a variable in a stored procedure that puts the
> > first name, last name, and middle name in the format
> > LastName, FirstName MiddleName. (I cannot just used the
> > columns firstname, lastname, etc. as they are not
> > available in the stored proc.) I am trying to split this
> > up so that it reads LastName, [new line] ~r~n FirstName +
> > MiddleName. Any suggestions on extracting this into that
> > format? Any help greatly appreciated.
> > I am working with Infomaker 6.0 and Windows 2000
> > Thanks,
> > Sean


0
Terry
3/23/2004 7:54:45 PM
Here is what I have so far and it will print the last name,
but I need something to get the first name on the next line.
Again, the format is LastName, FirstName
left(cpat_name,(pos(cpat_name,char(44)) -1)) + ',' +'~r~n' +
???




> Actually, it's just the format LastName, FirstName
> so I would only need to search for the comma and then ~r
> for the first name.
> Sean
>
> > I have a variable in a stored procedure that puts the
> > first name, last name, and middle name in the format
> > LastName, FirstName MiddleName. (I cannot just used the
> > columns firstname, lastname, etc. as they are not
> > available in the stored proc.) I am trying to split this
> > up so that it reads LastName, [new line] ~r~n FirstName
> > + MiddleName. Any suggestions on extracting this into
> > that format? Any help greatly appreciated.
> > I am working with Infomaker 6.0 and Windows 2000
> > Thanks,
> > Sean
0
Update
3/23/2004 7:56:12 PM
Once again, thanks Terry.
You're awesome.
Sean
> Here is what I have so far and it will print the last name
> , but I need something to get the first name on the next
> line. Again, the format is LastName, FirstName
> left(cpat_name,(pos(cpat_name,char(44)) -1)) + ',' +'~r~n'
> + ???
>
>
>
>
> > Actually, it's just the format LastName, FirstName
> > so I would only need to search for the comma and then ~r
> > for the first name.
> > Sean
> >
> > > I have a variable in a stored procedure that puts the
> > > first name, last name, and middle name in the format
> > > LastName, FirstName MiddleName. (I cannot just used
> > > the columns firstname, lastname, etc. as they are not
> > > available in the stored proc.) I am trying to split
> > > this up so that it reads LastName, [new line] ~r~n
> > > FirstName + MiddleName. Any suggestions on extracting
> > > this into that format? Any help greatly appreciated.
> > > I am working with Infomaker 6.0 and Windows 2000
> > > Thanks,
> > > Sean
0
Sean
3/23/2004 9:46:39 PM
Reply:

Similar Artilces:

[contacts] Option to display names in [Last name] [First name] order
I've come up with the image of the "Display by last name". Could you confirm UI? Bugzilla 916789 https://bugzilla.mozilla.org/show_bug.cgi?id=916789 Thanks, Teiichiro ...

Address book is displaying Last Name, First Name and messing up name completion
How do I change my address book so that the name completion looks at First Name, Last Name??? It sounds simple, but I have two computers with the Last Name, First name and it is a pain with the name completion enabled. Thanks Address Book, View, Name Format Cheers Dave -- Dave Parkes [NSCS] Occasionally resident at http://support-forums.novell.com/ Two things I don't like about the firstname, lastname/lastname, firstname thing: 1) With shared address books, an individual user cannot choose which way it goes. 2) Name completion search won't find it...

Separating a Full name into a First name & Last name using substring
I am trying to take a textbox that allows a full name to be entered, and then split out the name into a First Name and Last Name. I assume that I use a substring, but how? Hi, You can use the split function to divide a string based a character, ie: Dim fullname() as string = textbox1.Text.Split(" ") Dim firstname as string = fullname(0) Dim lastname as string = fullname(1) Any doubt, post your comment.Segundo Serrano P.Ing. Sistemashttp://www.4workgroup.com/Blog: http://dotnet-peru.blogspot.com That worked perfectly for a textbox.  How do I split out a string that com...

First Name Middle Initial Last Name Replies not working
Has anyone discovered or encountered an issue with receiving email using display names appearing as "first name middle initial last name" <firstname.lastname@domain.com> naming formats? We have subsidary sites setup in our GroupWise system that relfect these display names but whenever we reply to these particular addresses they bounce back stating "user unknown..." The SMTP property information appears to have re-written the original SMTP info as "David W..Wagner@Cimtel.com" instead of just "David.Wagner@Cimtel.com". Here's w...

Name completion-Extra space between first name and last name GW 6.5
Does anybody know of a way to correct a Address Book entry that has an extra space between the first name and the last name. In console One there is no indication that there is an extra space. When you type the first name you have to enter two spaces before the correct last name comes up. I have some whiners that thinks this problem is oh so dreadful. Should I just archive the mail from the problem Mailbox, delete the account, recreate it and then restore from the archive? spacey in Seattle Dick Lunceford, > In console One It really probably is in there - most li...

Search by first/last name or just last name?
I have a simple page that searches an access database by first and last name. How would I set it up to search by the first and last name OR just the last name.I tried this:where ([player.first_name] LIKE '%' + ? + '%') and ([player.last_name] LIKE '%' + ? + '%') or  ([player.last_name] LIKE '%' + ? + '%')but it didn't work. Thank you.  You just about got it, you just need a couple more parens, like this:where (([player.first_name] LIKE '%' + ? + '%') and ([player.last_name] LIKE '%' + ? + '%'...

Reverse Last Name First Name
Is there a function that will reverse the order of a Persons name? We get data from different xml files with the name all together. Sometimes they are Last Name, First Name MI. Sometimes Lastname space first name space MI. Sometimes just Last Name space First Name. I am using Delphi 2010. TIA Jan B wrote: > Is there a function that will reverse the order of a Persons name? > We get data from different xml files with the name all together. > Sometimes they are Last Name, First Name MI. Sometimes Lastname > space first name space MI. Sometimes just Last Name space F...

First name, last name changing
does any one know why groupwise changes in the address book the email with the addresses like this one "lastname.fistname@domian.com" to "fistname.lastname@domain.com", I have this problem and when my users want to send an email, the system send them a email account error, do any one how can I solve this problem? What version/patch level? Are you using Internet Addressing or addressing rules? Is this happening to everybody? Have you emptied FC address books? -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** ...

Question about 5.5.7.1 usernames, last name first or first name first
I have been looking through all the settings on groupwise and i am yet to find how to change the names from last name first to first name first. My account happens to say Phil Halbasch where others says Halbasch, Phil. If anyone knows of that secret setting to modify this it would be helpful. Thanks, Phil I figured it out, sorry for wasting ur time :) FYI Click Address book Click View tab and then name format "Phil Halbasch" <abc@hotmail.com> wrote in message news:FJrDb.4825$Rl1.3427@prv-forum2.provo.novell.com... > I have been looking th...

Simple First name last name query
Hi everyone I have a small (or i thought ) problem we get the first name and last name in one column separate by a comma " , ". We needed to separate the two. we used this SQL, but this does not work in the case we dont get the comma select substring('anu,nat',1,charindex(',','anu,nat')-1) Works select substring('anunat',1,charindex(',','anunat')-1) Does not work Can anyone help us on this Charanjiv On Fri, 02 Apr 1999 11:07:54 +0530, Charanjiv <Ckalha@velos.ssind.com> wrote: >Hi everyone >...

How do you add First Name and Last Name to asp:CreateUserWizard
How do you add extra fields to CreateUserWizard.  Examples on here and around the net only show how to save to profile in web.config, but not in a database table like (aspnet_Users).  I extended the aspnet_Users table with FirstName and LastName fields.  Now I want to connect the CreateUserWizard to it.  How do you do it without creating another database connection?  Would I be able to save the FirstName and LastName fields to the database table when all the other default fields are created?  If so, how? The built in sqlmembership provider does not do this.&nb...

Groupwise user name in pace of first and last name
We meet a strange behaviour with groupwise client ( windows ) in caching mode. since we've chosen "caching mode", Return notification ( popup ) for tracking information display "groupwise username" in place of "first/last Name" Anyone experienced this case ? Thanks -- chabot49 ------------------------------------------------------------------------ chabot49, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been ...

Can you sort the mailbox by first name or last name?
I had someone ask me this, and I didn't see a way to do it. The "mailbox" folder in Gwise shows FROM and you can "sort" by that But the user wanted to sort by last name, but I didn't see a way to add "last name" as a column and sort on it (at least for Mailbox). I see "Name" (which may as well be the "from" field). Anyone got a workaround or know if this can be done? You can't sort, filter is probably the best workaround Cheers Dave -- Dave Parkes [NSCS] Occasionally resident at http://support-forums.novel...

Last name/First Name field in Groupwise Client
Groupwise Client 7.0.1 (13/06/2006) I have added the fields 'Last Name' and 'First Name' to the fields displayed in my Groupwise Client. Both fields display blank, even though their corresponding fields in the Address Book are populated. Where does the client pick up these fields from, and what can I do to have these fields display in the GW client for sorting purposes? Thanks Rob Rob, > Both fields display blank, even though their corresponding fields in > the Address Book are populated. > > Where does the client pick up these fields from...

Web resources about - Extracting first name, last name, middle name from a string - sybase.infomaker.general

Local Measure addresses the importance of extracting value from Big Data
There are many opportunities surrounding the Big Data space and if businesses milk the value from all the data they’ve got, it can change the ...

Dentist deregistered after extracting teeth and performing root canal work without patients’ consent
A DOWN-in-the-mouth dentist who extracted wisdom teeth and performed root canal work on patients without their consent has been deregistered ...

Extracting the digital
Alexa Moses tries to make sense of the Resfest digital film festival. - Sydney Morning Herald Online

Shy bidders' tactics make extracting bids almost as painful as dental work
Shy bidders' tactics make extracting bids almost as painful as dental work

Brookfield 'ruthless' in extracting infrastructure profits, says CBH
The nation's biggest grain exporter CBH Group has thrown its weight behind concerns by farmers over Brookfield's $8.9 billion proposed takeover ...

Companies extracting B.C. groundwater for free
Several groups are calling on the province to tighten groundwater laws as B.C. is the only jurisdiction in Canada that does not charge major ...

Extracting info: Why’s it so hard to get the goods on oil spills?
It can be tough to get a good sense of how safe Alberta’s oil industry is when you can’t access the information you need.

Krugman on extracting a price for intellectual dishonesty
Just a small point, but with it I want to make a larger one. ■ The small point is about Paul Krugman and his slow path to calling out his professional ...

When Oil Isn’t Worth Extracting
... the point at which energy resources become too costly to take out of the earth: We’ll never run out of any fossil fuel, in the sense of extracting ...

Revenge is ours: extracting energy from a cockroach
... inside it to use it as a mini-electricity generator. Now, I hate cockroaches as much as anyone, and there is a certain satisfaction in extracting ...

Resources last updated: 12/19/2015 12:23:16 PM