Statalist


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

st: AW: re: data entries


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: re: data entries
Date   Wed, 20 May 2009 15:00:44 +0200

<> 

Tunga wants only ":2" at the end of his strings, so Kit`s solution could be
problematic, as it seems to search anywhere within the string...

*************
clear
input str9 var1
"2011017:1"
"2011018:1"
"2011018:2"
"2011026:1"
"2011:20:1"
"2011041:1"
end
count if strpos(var1,":2") > 0
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Kit Baum
Gesendet: Mittwoch, 20. Mai 2009 14:42
An: statalist@hsphsun2.harvard.edu
Betreff: st: re: data entries

<>

clear
input str9 var1
"2011017:1"
"2011018:1"
"2011018:2"
"2011026:1"
"2011040:1"
"2011041:1"
end
count if strpos(var1,":2") > 0


Kit Baum   |   Boston College Economics & DIW Berlin   |
http://ideas.repec.org/e/pba1.html
                               An Introduction to Stata Programming   
|   http://www.stata-press.com/books/isp.html
    An Introduction to Modern Econometrics Using Stata  |
http://www.stata-press.com/books/imeus.html



*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index