ALTER TABLE (m.t) RENAME COLUMN (m.OldName) TO (m.NewName)&&syntax errorthanks
> >FOR gnCount = 1 TO FCOUNT( ) > m.OldName = FIELD(gnCount) > m.NewName = ALLTRIM(EVALUATE(FIELD(gnCount))) > ALTER TABLE (m.t) RENAME COLUMN (m.OldName) TO (m.NewName) >NEXT > >>
>>thisform.text1.Value=GETFILE('xls') >>IMPORT FROM (thisform.text1.value) TYPE XLS >> >>use JUSTSTEM(thisform.text1.value) >>m.t=JUSTSTEM(thisform.text1.value) >>*alter table (m.t)(a >>CLEAR >>FOR gnCount = 1 TO FCOUNT( ) && Loop for number of fields >> ? FIELD(gnCount) && Display each field >>NEXT >>? >>? 'Number of fields: ' + ALLTRIM(STR(gnCount -1))&&a,b,c,.....j >>*CLEAR >>USE (m.t) >>? FCOUNT(m.t) &&result is 10 >> >>alter table(m.t)(A with first column data,B with..... ) >>>>