123 and 0123 are the same number. You can never make the variable numeric and "keep them distinct" - if the distinction is important, then they are not numbers, they are codes and the string format is the correct one.
David
-----Original Message-----
From: Nawar, Eric [mailto:[email protected]]
Sent: 05 July 2005 15:00
To: [email protected]
Subject: st: destring, keeping leading zeros
I have a string variable which has the following distinct codes:
0123
123
I want to make the variable numeric, but I want to keep the leading zero
on the first code to keep them distinct. A suggestion to a similar
posting was to format with leading zeros - but this would make both
codes "0123".
Thanks,
Eric
*
* 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/
*
* 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/