Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: Changing the ID


From   Rajaram Subramanian Potty <[email protected]>
To   [email protected]
Subject   Re: st: AW: Changing the ID
Date   Wed, 14 Oct 2009 15:49:29 +0530

Thanks for answering and the syntax worked as expected.

RAJA

On Wed, Oct 14, 2009 at 3:36 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> 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/
>

*
*   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/



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