Domanda

I have a table with ten fields, f1 (being an integer field) to f10 (being a character field). In between there are other integer, character and date fields.

I would like to copy those field definitions to another table, without needing to re-write the whole definitions. I'm working with the Data Dictionary, who seems not to cover this feature.

Edit after first answer
The first answer mentions how to do this at runtime, but I'm specifically looking for a solution at design-time.

Edit
I've found there are different commandline utilities which can be used for working with Progress database: ProDB for creating a new database, ProUtil for doing several tasks (but I don't find a ProUtil <add a field to a table>).

How can I achieve this?

È stato utile?

Soluzione 2

The Data Dictionary contains the possibility to add a field. Inside that dialog box, there's the possibility to copy a field from another table.

Apparently in there it is possible to copy multiple fields (although being inside the dialog box for one single field, hence my mistake).

Altri suggerimenti

I would like to copy those field definitions to another table, without needing to re-write the whole definitions.

How about this?

create table t2 as 
select * 
from t1 
where 1 = 2 ; 

OK, it doesn't copy indexes and such like, but it gets you the basic structure, as requested.

I'm working with the Data Dictionary, who seems not to cover this feature.

Given that the job of a Data Dictionary is to manage the structures of other tables, I'd say that's a pretty big hole in its functionality!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a dba.stackexchange
scroll top