Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE : Help with string problem


From   "Nicolas Couderc" <Nicolas.Couderc@univ-paris1.fr>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE : Help with string problem
Date   Fri, 25 Aug 2006 13:23:57 +0200

Fred,

If all your ids are 9 chars wide and begining with a capital C, to deleting
everything else than the id, you can try :

gen apatkey2=""
replace apatkey2= substr(apatkey,strpos(apatkey,"C"), 9)

Hope this helps,
N

-------
Nicolas Couderc

Centre d’Economie de la Sorbonne, TEAM & CNRS
Maison des Sciences Economiques,
Université Paris 1 - Panthéon-Sorbonne
106-112, boulevard de l'Hôpital 
F-75647, Paris, Cedex 13


-- 
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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