|
<< Click to Display Table of Contents >> Generate SQL CREATE |
![]() ![]()
|
The PdxEditor can reversibly create SQL statements that can recreate the structure of the currently viewed table.
However, this will not be complete replicas of the original tables with it's types and type sizes specific for the table format in focus, as this may not comply with other database systems not understanding the unique field type names and dimensioning notably used by older versions of dBASE/FoxPro tables.
For example the narrow Paradox integer field type "Short" may be substituted with a somewhat wider integer type field.
Also, the dBASE text based "Numeric" fields may be substituted with either Integer or Float type fields, when ported.
See also PdxEditor: Table file management\Copy Table
*: See PdxEditor script handling introduced with PdxEditor vers. 5.

PdxEditor screen print: SQL CREATE TABLE for Paradox table biolife.db
Unfortunately the BDE Local SQL does not allow including creating indexes (other than primary keys) within the CREATE TABLE statements.
So, creating indexes must be done via separate CREATE INDEX statements - please look up the Local SQL manual.
Also, BDE Local SQL does not provide the capacity of setting required fields or other field level validity checks via SQL.
So, setting or lifting required field settings via the PdxEditor has to be performed via a non-SQL restructure procedure.
See also File Restructuring\Required attribute.
Indexes and required fields are thus reported separately between comment markers.
The BDE implementation with Local SQL largely provide cross table compability between Paradox, dBASE and ForPro, though Paradox's field type BYTES is not compatible with dBASE or FoxPro.
Other field types are appropiately converted between the table formats and versions according to their native field types.
The SQL CREATE TABLE statements by PdxEditor may widely be used also with external database systems from other vendors.
As the BDE/Local SQL (by default) basically is not capable of running multiple statements* in the same execution, the transfer of table data basically must rely on a combination of SQL CREATE statements and some data import procedure in the receiving data base of data exported by PdxEditor.
Transfer of data after executing the CREATE statement can easily be performed by e.g.:
INSERT INTO EmployeeCopy.db
SELECT *
FROM employee.db
provided, that data types are compatible column to column between the SELECT source table and the receiving INSERT INTO table.
In PdxEditor table creation from an existing data source may also simply be substituted via the Delimited Text import feature.
See also Redefining a Table.
__________________________