<>
Am I right that the "A" always appears in second place (or you only want it
-replace-d then)? In any case, you said you wanted the lowercase "a" also,
so amend the -if- qualifier...
*************
if strpos(id, "A")==2 | strpos(id, "a")==2
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Rajaram
Subramanian Potty
Gesendet: Mittwoch, 14. Oktober 2009 11:51
An: [email protected]
Betreff: st: Changing the ID
Dear all,
I have a data set which contains IDs of individual cases. But
unfortunately some of the IDs include character "A", (either in
capital or small). Instead of the value "0" for some of the cases "A"
is included. I just want to know how, I should remove "A" and put "0".
Following is the example of the IDs of 14 observations.
1A01506006
10015021903
10015012502
100150122013
1001505901
10015020502
10015026104
10015014402
1A015018102
1001506704
10015026601
10015028107
1001507004
1A01508604
Thanks and regards,
RAJARAM. S
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/