My guess is that what you are getting what you 
ask for, but that it is not what you want. 
The difference between 
	if <condition> <command> 
and 
	<command> if <condition> 
is profound. For one documentation, see
http://www.stata.com/support/faqs/lang/ifqualifier.html
I am not clear what you want precisely. If you 
want to drop a variable if and only if all observations
are missing, then 
. search dropmiss 
for a convenience command. 
Nick 
[email protected] 
Alejandro Delafuente
> 
> Dear Nick, thanks for your advice. With some little 
> adjustments it worked out! 
> Also, taking advantage of your generosity let me ask you a 
> quick question: am 
> trying to drop some monthly variables in a time sequence 
> (from january 1961 to 
> dec 2001) with missings in them. My code looks as follows:
> foreach var of varlist jan* feb* ... dec* {
> 	if `var' ==. {
> 	drop `var' 
> 	}
> }
> But for some reason it is not working. Can you tell why?
> As always, many thanks.
> 
*
*   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/