Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Reading the letters in a name up to aparticular character in Stata 8.2

From   "Dev Vencappa" <>
To   <>
Subject   Re: st: Reading the letters in a name up to aparticular character in Stata 8.2
Date   Mon, 13 Jun 2005 13:41:34 +0100

Thanks a lot for that. I just found out the solution while browsing through the string functions in Stata 8.

Many thanks


>>> 06/13/05 1:27 pm >>>
>  apologies if this has been posted  before and I missed it. I have a
>  string variable which is the name of companies (fictitious example
>  follows):
> XYZ, International
> ABCDE, National
> DFTRER, Exports
> etc
> I want  to keep only the first part of the company name (e.g. keep XYZ
> ABCDE DFTRER, etc). The obvious solution is to ask Stata to read the
> letters and chop off anything from the character "," onwards, but am
> not very sure which command to use in Stata 8.2  to be able to do
> that. 

An almost identical problem cropped up on the list last week initiated by Heather Gold.

The various response should provide you with a solution, see... 



Neil Shephard
Genetics Statistician
ARC Epidemiology Unit, University of Manchester 

"If your result needs a statistician then you should design a better experiment" - 
Ernest Rutherford

*   For searches and help try:

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index