Colleagues,
Say, you have a table in which you need to change - programmatically! - a field's name (just that).
I can think of two ways to do that:
Method #1.
Method #2.
But!... Is there any command to do this with one line of code? (The level of my senility is definitely on the rise! :-( )
TIA!
Regards,
Ilya
Say, you have a table in which you need to change - programmatically! - a field's name (just that).
I can think of two ways to do that:
Method #1.
Code:
AFIELDS(laFlds, "OLD_TABLE")
change the field's name in the array
CREATE TABLE "NEW_TABLE" FROM ARRAY laFlds
APPEND FROM OLD_TABLE
Method #2.
Code:
ALTER TABLE OLD_TABLE ADD COLUMN NewFldName
REPLACE OLD_TABLE.NewFldName WITH OLD_TABLE.OldFldName ALL
ALTER TABLE OLD_TABLE DROP COLUMN OLdFldName
But!... Is there any command to do this with one line of code? (The level of my senility is definitely on the rise! :-( )
TIA!
Regards,
Ilya