Matsta,
It seems like you want to delete a field (column) from a table's structure. Am I right? If so,there are several ways to do so. And what do you mean by "empty"? All records have NULL value in it? Or just '' for strings, {//} for date, 0 for numerics, etc.? Let's assume for simplicity thatyou mean NULL. Here is some code that first came to mind (not tested, but should work).
SELECT MyTable
COPY STRUCTURE EXTENDED TO MyStru
USE MyStru IN 0
SELECT MyStru
SCAN
SELECT DISTINCT &Field_Name ;
FROM MyTable ;
WHERE !IsNull() ;
INTO ARRAY tmp
IF _TALLY=0
DELETE IN MyStru
ENDIF
ENDSCAN
PACK
CREATE NewTable FROM MyStru
APPEND FROM DBF("MyTable"
This way, you get everything in the new table less the "empty" fields. If you want, you can close and rename them, etc. If you didn't mean NULL, then you will need to check also Field_Type, and compare the values in MyTable to 0, and use Empty() function, where applicable.
You might also want to check alternative solutions, probably using AFields() function and CREATE TABLE FROM ARRAY (SQL command), and, possibly, more. I am not sure
if ALTER TABLE (SQL) can help you delete fields, I don't usually use it.
Stella.