SELECT 0 USE (cFile) IF Empty(Field('thh05')) USE Alter Table c:\db\past.DBF Rename Column thh05 To thh11 ENDIF USE>Not even close. You're checking for presence of string 'thh05' in the table name (including path). And comparing result of comparison with .F. is totally unnecessary. That what NOT is for
>SELECT 0 >USE (cFile) >IF TYPE(ALIAS() + '.' + thh05) <> "U" > USE > Alter Table c:\db\past.DBF Rename Column thh05 To thh11 >ENDIF >USE >>
>>cfile='c:\db\past.DBF' >>if 'thh05'$cfile = .F. >>>>k
>>>Alter Table c:\db\past.DBF Rename Column thh05 To thh11 >>>>>>