Navigation:  Data Management > Clone to SQL (Single Table) >

SQL Script Editor

Previous pageReturn to chapter overviewNext page

SQL Script Editor Tab

 

When this tab opens up you are offered the full sql script created for your table

 

You can change the Table Name directly with the button provided for this

You can also use the Search & Replace option

 

When a columnName is an SQL reserved word, DMC will prefix it automatically for you with the SETUP/Setting you have entered

 

If you do not want this prefix added then you can enter the prefix followed with an underscore in the Search field (sql_ by default) press the TAB key and click on Search & replace to remove them all

 

In SetupSet/tings you also have the possibility to define DATE and TIME DETECTION and to enter the genric portions you as a user generaly use as a Date Column Name (or time)

DMC will then scan all LONG declared type columns and check if they can be of a DATE (or Time) type and offer you to replace the SQL column with a proper Date (or Time) Column

(you can accept or refuse at a column level during the script creation process)

you can also override the default setting BEFORE starting the cloning process with the relevant check boxes to toggle your settlings

 

This script is already saved on hard drive for you in the directory \cgf_import\Structure\ with a naming convention as follows :

'Clone_' and the Table Name and '_' and the SQL driver (SQL-MySQL-Oracle etc...) and finally with '_Struct.sql'

 

You can modify directly the script and save it to any name you wish by clicking on the "save as..." button

The default name offered for saving uses the same naming convention but instead of 'Clone_' it starts with 'UserScript_' for you to separate them more easily

 

If you want to abort the complete cloning process you can use the "Cancel" button

 

You click on the "Execute" button to create the new table and have the process follow it's course till the Mappings Tab

 

In case of an error, you will be told so by two messages and the sql script placed in the clipboard for you

 

You can of course modify the script and try to run it as many times as needed till success or till you cancel the process

 

You copy paste a script in here to run it IF if is a TABLE creation one

You can also copy paste here SEVERAL scripts one after the other and execute them all in one pass IF the FIRST one is a TABLE CREATION script

If you do so, DMC will parse the FIRST line where CREATE TABLE is contained and EXTRACT from there the Table Name to use for the cloned table to be read.

 

The process is now resumed and you are offered the mapping tab for you to transfer your Data