Dear stata users,
I have a string variable (caseid) coded on the format :
. codebook caseid
caseid ---------------------------------------------------- Case Identification
type: string (str16), but longest is str15
unique values: 3109 coded missing: 0 / 3552
examples: "7 2 177 43 2"
"1210 51140 2"
"1831 105 76 5"
"2647 3 40 2"
I want: 72177432
1210511402
etc.,
I use the command: g newid=trim(caseid)
but it returns a type mismatch error.
The real() and destring commands don't work and the encode one leaves blanks as
caseid.
Can somebody helps?
Cheers.
Amadou.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/