>> IF USED(justname ) >> SELECT &justname >> ELSE >> USE (ojc.curtable) in 0 EXCL && Reopen table to do the alter table >> SELECT &justname >> *wait window 'table not there' && nl temporary handling. >> ENDIF >> lnumflds=afields(fldlistall,justname ) && Get the list of fields in array fldlist >> DIMENSION lfldlist(lnumflds) >> idx=0 >> >> FOR i=1 to lnumflds >> IF '_A'$fldlistall(i,1) >> idx=idx+1 >> lfldlist(idx)=fldlistall(i,1) >> ENDIF >> >> ENDFOR >> lnumchgflds=idx >> IF lnumchgflds>0 >> *Wait window nowait 'Number of unclear fields are '+ALLTRIM(STR(lnumchgflds)) >> starttime = seconds() >> FOR i=1 to lnumchgflds >> newname=left(lfldlist(i),AT('_A',lfldlist(i))-1) >> ALTER TABLE (tblname) RENAME COLUMN (lfldlist(i)) TO (newname) >> >> ENDFOR >> >> *wait window nowait "ALTRTABL: Total time = " + str(m.endtime - m.starttime, 10, 4) >> endtime = seconds() >> *wait window nowait "ALTRTABL: Total time = " + str(endtime - starttime, 10, 4) >> ENDIF>>