Michael,
I assume the variable is in numeric format.
. list
+-------+
| var |
|-------|
1. | 8070 |
2. | 80703 |
3. | 8071 |
+-------+
. list if substr(string(var),1,4)=="8070"
+-------+
| var |
|-------|
1. | 8070 |
2. | 80703 |
+-------+
Friedrich
On Sat, Aug 30, 2008 at 2:26 PM, Michael McCulloch <[email protected]> wrote:
> Hello,
> If I have a variable that contains:
> 8070
> 80703
> 8071
> is it possible to define an -if- statement that will give me
> 8070
> 80703
> but not
> 8071
> ?
*
* 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/