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
Dear Walter:
gen s(3) newid=substr(id,1,3) select newid="cdh" savedata "newset.rec" /replace
Regards,
Hans
On 23-Jul-13 07:45, epidata-list@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
epidata-list@lists.umanitoba.ca