stripping letters from a field, Smart stripping!!  
Author Message
exgi





PostPosted: Fri Jul 08 10:38:18 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!!

i have a cursor that i am creating Letters from.
in Details.to it will have Mr. J. John Doe or John V. Doe

when i begin the Letter is want it to say... Dear John

right now it will say Dear J. John Doe. how can i strip or remove chars
smartly or have it set so i wont cream names?

Exchange Server27  
 
 
Edhy





PostPosted: Fri Jul 08 10:38:18 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!! Hi Tom,

Do you have a field for cFirstName? or just cFullName? if you have such a
field, you can use cFirstName for that.

--
Edhy Rijo
www.progytech.com
Bronx NY




>i have a cursor that i am creating Letters from.
> in Details.to it will have Mr. J. John Doe or John V. Doe
>
> when i begin the Letter is want it to say... Dear John
>
> right now it will say Dear J. John Doe. how can i strip or remove chars
> smartly or have it set so i wont cream names?
>
>


 
 
Tom





PostPosted: Fri Jul 08 10:46:03 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!! Edhy, i am not that Lucky, if i did i wouldnt have asked what to do here.

nothing can be to easy.


 
 
Mark





PostPosted: Fri Jul 08 11:20:06 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!! This is a multi-part message in MIME format.

------=_NextPart_000_002B_01C583AF.0051E650
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable


You can use the StrTran() function on a readwrite cursor, but you may =
have to use it repeatedly to remove all of the unwanted characters.

Mark=20



i have a cursor that i am creating Letters from.
in Details.to it will have Mr. J. John Doe or John V. Doe

when i begin the Letter is want it to say... Dear John

right now it will say Dear J. John Doe. how can i strip or remove =
chars=20
smartly or have it set so i wont cream names?


------=_NextPart_000_002B_01C583AF.0051E650
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.3790.327" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You can use the StrTran() function on a =
readwrite=20
cursor, but you may have to use it repeatedly to remove all of the =
unwanted=20
characters.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2></FONT>
<DIV>Mark </DIV>
<DIV>&nbsp;</DIV>
<DIV>"Tom" &lt;<A=20

om</A>&gt;=20



<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">i=20
have a cursor that i am creating Letters from.<BR>in Details.to it =
will have=20
Mr. J. John Doe or John V. Doe<BR><BR>when i begin the Letter is want =
it to=20
say... Dear John<BR><BR>right now it will say Dear J. John Doe.&nbsp; =
how can=20
i strip or remove chars <BR>smartly or have it set so i wont cream=20
names?<BR><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_002B_01C583AF.0051E650--

 
 
KevClark64





PostPosted: Fri Jul 08 13:03:47 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!! There is probably no algorithm you can write to do this perfectly.
There is just no way to write something that can determine a first name
correctly in all cases from a full name. Depending on how many of
these you have to send out, you might write an algorithm that gets most
of them right, and then do a mail merge into a Word document so that
you could go through and eyeball them and edit whatever needs to be
edited.

Alternatively, you might want to consider "Dear Friend:"

Kevin Clark

 
 
Sergey





PostPosted: Fri Jul 08 18:29:46 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!!
> i have a cursor that i am creating Letters from.
> in Details.to it will have Mr. J. John Doe or John V. Doe
>
> when i begin the Letter is want it to say... Dear John
>
> right now it will say Dear J. John Doe. how can i strip or remove chars
> smartly or have it set so i wont cream names?
>
>
Hi Tom,

You can use a name parser, like one from
http://www.dsbusinesssolutions.co.uk/products_nameparser.html

--
--sb--

MVP VFP
 
 
Gene





PostPosted: Mon Jul 11 16:07:14 CDT 2005 Top

Exchange Servers >> stripping letters from a field, Smart stripping!!

>There is probably no algorithm you can write to do this perfectly.

As an example, "Lee Ann" is a first name.

>There is just no way to write something that can determine a first name
>correctly in all cases from a full name. Depending on how many of
>these you have to send out, you might write an algorithm that gets most
>of them right, and then do a mail merge into a Word document so that
>you could go through and eyeball them and edit whatever needs to be
>edited.
>
>Alternatively, you might want to consider "Dear Friend:"

Pretensions to friendship get file 13 from me. I much prefer
"Dear Sir:". Formality is not unfriendly.

Sincerely,

Gene Wirchenko