Hi,
Is it possible to rename the column of a database based on its position rather than its name? For example, change the last column of a database to a standardised name.
I am looking for something similar to how you index by columns with a data.frame or matrix in R and Python.
thanks,
Mike
mikew
Offline
Last seen: 7 months 1 day ago
Joined: 09/25/2019 - 08:25
Hi mikew,
you didn't post any code example so I guess that you are using TableDef.GetField("FIELDNAME") to find the field by it's name. Instead of applying TableDef.GetField("FIELDNAME") you can try TableDef.GetFieldAt(index) to access the fields by index. To get the last column or the number of fields in you database IDEA contains TableDef.Count.
thanks, exactly what I was looking for!