[EpiData-list] How to select text/string variables

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Jul 23 12:41:01 CDT 2013

Dear Walter:

gen s(3) newid=substr(id,1,3)
select newid="cdh"
savedata "newset.rec" /replace



On 23-Jul-13 07:45, epidata-list at lists.umanitoba.ca wrote:
> I  have a database which I imported from excel into EpiData stat, the
> unique IDs are string e.g (cdh01/09, cdh02/09......cdg01/09,cdg/02/09....).
> How can I select a data set with only "cdh"  for further analysis?
> Walter

Hans L Rieder, MD, MPH
Jetzikofenstr 12
3038 Kirchlindach

Tel: +41 31 829 4577
Mob: +41 79 321 9122
Web: http://www.tbrieder.org

More information about the EpiData-list mailing list