Try OpenEdge Now
skip to main content
Basic Database Tools
Advanced Menus Reference : PRO/SQL menu options : Dump as CREATE TABLE Statements option
 

Dump as CREATE TABLE Statements option

Choose PRO/SQL > Dump as CREATE TABLE and CREATE INDEX statements to generate an SQL DDL program that contains CREATE TABLE statements equivalent to those originally used to define the selected table.
Note: This option also works with non-OpenEdge databases.
When you choose this option, the Data Dictionary alphabetically lists all the tables defined for your database. Select the table for which you want to make CREATE TABLE statements. The Dump CREATE TABLE dialog box appears, as shown in the following figure:
Figure 72. Dump CREATE TABLE dialog box
The Dump CREATE TABLE dialog box contains the following fields:
*Output File for CREATE TABLE — Specifies the filename to which you want to write the CREATE TABLE statements. The default filename for a single table is table-name.p. If you specify all tables, the default filename is database-name.p.
*Output File for CREATE INDEX — Specifies the filename to which you want to write the CREATE INDEX statements. The default filename for a single table is table-name.i. If you specify all tables, the default filename is database-name.i. If you do not specify a filename, the Data Dictionary writes the CREATE INDEX statements to the CREATE TABLE output file.
*SQL-Flavor — Specifies the type of SQL you want to use: OpenEdge, ORACLE, or MS SQL Server. When ORACLE is selected, any field defined as INT64 is converted to the NUMBER data type. When MS SQL Server is selected, any field defined as INT64 is converted to BIGINT data type.
*Create Recid Field — Select this option if your database currently contains the PROGRESS_RECID field. Selecting this option will maintain the use of PROGRESS_RECID in any new tables added by this utility.
*Create Shadow Columns — If your DataServer is configured with a case sensitive code page, this box is available for selection. Selecting it provides case insensitivity compatible with the behavior of an OpenEdge database.
*Include Defaults — Select if you want the OpenEdge initial value used as the default in the SQL script.
*Use Unicode Types — Select if you want Unicode data types preserved.
*Expand Width (utf-8) — Select if you want field widths expanded to hold utf-8 encoded characters.
*Use Revised Sequence Generator — Select if you want sequences to be revised.
*Map to MSS ‘Datetime' type — Select if you have dates you want converted to the MS SQL Server Datetime data type.
*For field widths use Width — Select if your OpenEdge database contains data that is larger than the display format. Change the width to the proper size. The utility will use the Width field instead of the display format.
*For field widths use ABL Format — Select if you want the Data Dictionary to use the display format instead of the field's width.
*Expand x(8) to 30 — If selected, indicates that fields with FORMAT set to x(8) will be given a default width of 30 characters.
*For Create RECID use 1.Trigger — Select if you want a trigger to determine the RECID value.
*For Create RECID use 2.Computed column — Select if you want a computed column to determine the RECID value.
After generating the file, the Data Dictionary prompts you to continue.