Columns would be added to a ‘table’ rather than to a ‘database’. But if you want to “pass a variable”, what are you expecting to “pass” it to? When anyone wants to pass a variable, it usually implies some function or procedure that would be used multiple times with different values. How would you add the columns to a table multiple times? — Tom
Sorry Tom, I think you missed the software/hardware used. This question as stated makes sense for Foxpro which is both a programming language and dbms where each table is called a dbf, data base files. However, rather than add columns to the table you probably need a second table with a key matching the first table, a day number field which is also part of the key and a value field. That would start you off with a normalized data structure. Phil
Ah, Foxpro… you’re right. I saw the SQL commands and missed Foxpro 2.6. The reference to “database” makes a little more sense.
But the basic issue is still the purpose of a “variable” for this. By understanding what is expected of a “variable”, an answer might be possible regardless of the software. Why not simply add the desired columns and be done with it? What business problem is needing to be solved? (Especially for a version that’s going on a couple decades old. If the columns weren’t needed a year ago, what made them important now?)
My first recommenadtion would be to review your database design.