Import Data Wizard
Top  Previous  Next


You can import data to the table from MS Excel, DBF, TXT or CSV file, using the Import Data Wizard. This wizard is a very powerful tool, allowing you to import data easily and quickly, and set various import options. It is based on the EMS QuickImport Component Suite (check http://www.ems-hitech.com/quickimport/ for details).

To import data to a table

1 Select the table to import data to in the DB Explorer tree (press Ctrl+F for quick searching).  
2 Right-click and select the Data Manipulation item from the popup menu.  
3 Select the Import Data item from the Data Manipulation submenu.  

or  
 
1   Open the table to import data to in the Table Editor.  
2   Open the Data tab.  
3   Click the Import Data button on the toolbar.  

Import from
Select the type of the source file: MS Excel, MS Access, DBF, TXT or CSV. The file name extension in the Source file name box changes according to the selected import type.

Delimiter (CSV only)
Select the character, used for delimiting columns in the source CSV file.

Left quote / Right quote (CSV only)
Select characters, which stand for left and right quotation marks in the source CSV file.

Source Filename
Set the name of the file to import data from.

Load template from file
Use this button to fasten the process of configuring your current import by loading previously saved template with various import options (source filename, field correspondence, format options, etc) from file.

Click Next to proceed to the first step

Select Data Source (MS Access only)  

First select the data source for import - MS Access table or SQL query. If you choose import from a table, then you should select a table name from the list, if you choose to import from a query, you should set the query SQL text in the lower area, e.g.:

SELECT
 Name, Capital FROM COUNTRY WHERE CONTINENT='South America'


This text can be saved or loaded to/from SQL flea, using the Save and Load buttons at the right respectively.

Click Next to proceed to the next step.

Setting Correspondence         

On this step you should set the accordance between the source table columns and the fields of the table they are imported to.
   
XLS  

First select the table field from the Fields drop-down list. Then select the corresponding cells by clicking row or column caption (to select the whole row or column) or clicking the individual cells, using Shift and Ctrl keys.
You can also define the corresponding cells manually in the Cells edit field. Use semicolon to separate
multiple cells.
After you select all the corresponding cells for the current table field, proceed to another field and repeat all these operations for each table field.

Auto fill cols
Use this button to set the correspondence between the XLS columns and the table fields automatically. It is convenient if they are ordered in the same way. First XLS column corresponds to the first table field, second column to the second field, etc. If quantity of the XLS columns exceeds quantity of the table fields, then the last columns have no correspondence.

Auto fill rows
Use this button to set the correspondence between the XLS rows and the table fields automatically. It is convenient if they are ordered in the same way. First XLS row corresponds to the first table field, second row to the second field, etc. If quantity of the XLS rows exceeds quantity of the table fields, then the last rows have no correspondence.

If you don't want some first rows or columns of the source table to be imported, set the number of such rows in the Skip ... first row(s) and Skip first ... col(s) edit fields.

MS Access  

First select the table field from the Table fields list. Then select the corresponding field in the <TABLE_NAME> or Custom query list.
Click button Add to link these fields. These fields are added to the list at the bottom of the window. Repeat these operations for each table field. If you want to remove the accordance you set, select the linked fields in the bottom list and click button Remove.

Auto fill
Use this button to set the correspondence between the Access fields and the table fields automatically. It is convenient if they are ordered in the same way. First Access field corresponds to the first table field, second Access field to the second table field, etc. If quantity of the Access fields exceeds quantity of the table fields, then the last fields have no correspondence.

DBF  

First select the table field from the Table fields list. Then select the corresponding field in the <TABLE_NAME>.DBF list.
Click button Add to link these fields. These fields are added to the list at the bottom of the window. Repeat these operations for each table field. If you want to remove the accordance you set, select the linked fields in the bottom list and click button Remove.

Auto fill
Use this button to set the correspondence between the DBF fields and the table fields automatically. It is convenient if they are ordered in the same way. First DBF field corresponds to the first table field, second DBF field to the second table field, etc. If quantity of the DBF fields exceeds quantity of the table fields, then the last fields have no correspondence.

TXT  

First select the table field from the Fields drop-down list. Then set two separator lines to delimit the source table column. Click to add a separator, double-click to delete one. Drag separators to change the column width. You can also set the column starting position and the column width manually in the edit fields Pos and Size.
When you set the separators correctly, proceed to another field and repeat these operations for each table field.

If you don't want some first rows of the source table to be imported set the number of such rows in the Skip ... first line(s) edit field.

CSV  

If the delimiter you have defined on the first step was found in the source table, then you find the table columns already separated and delimited. Select the table field from the Fields drop-down list. Then click the corresponding source table column or set the Col value manually. Repeat these operations for each table field.

Auto fill
Use this button to set the correspondence between the CSV columns and the table fields automatically. It is convenient if they are ordered in the same way. First CSV column corresponds to the first table field, second column to the second field, etc. If quantity of the CSV columns exceeds quantity of the table fields, then the last columns have no correspondence.

If you don't want some first rows of the source table to be imported set the number of such rows in the Skip ... first line(s) edit field.

Click Next to continue or click Back to return to the previous step.

Import Formats  
 
Base Formats  

Decimal separator
Set a character, which delimits the decimal parts of the imported numbers.

Thousand separator

Set a character, which separates the digit groups in the imported numbers.

Short date format, Long date format, Short time
format, Long time format
Use these edit fields to set the date and time formats.

Left quotation

Set a character or a number of characters, which denote quoting in the imported strings.

Right quotation

Set a character or a number of characters, which denote unquoting in the imported strings.

Quotation action
You can select 'Add' to add quotation marks to each imported string or 'Remove' to remove all the quotation marks from the imported strings.

Boolean true
Set some variants of TRUE value representation in the imported table, e.g. 'Yes' or '+'. Use new line for each new variant.

Boolean false
Set some variants of FALSE value representation in the imported table, e.g. 'No' or '-'. Use new line for each new variant.

Data Formats  

On this tab you can customize the format of each imported field in case when additional formatting is required. Select the field in the Field Name list and set its format in the proper edit fields.

Tuning Tab

Generator Value
Use this edit field to set the initial value of the autoincrement field.

Generator Step
Set the step of the autoincrement field. If it is 0 then the value of the generator will be ignored.

Constant Value

Use this edit field to set the constant value of the field.

Null Value
Set the value, which will be understood as NULL to set the default value.

Default Value

Set the default value of the NULL field.

Left quotation
Set a character or a number of characters, which denote quoting in the imported string.

Right quotation
- set a character or a number of characters, which denote unquoting in the imported string.

Quotation action
You can select 'Add' to add quotation marks to the imported string, 'Remove' to remove all the quotation marks from the imported string or 'As is' to save the original quotation marks.

Char case
Set the case of the imported string. 'As is' saves the original string, 'Upper' sets the whole string to upper case, 'Lower' sets the whole string to lower case, 'UpperFirst' sets the first letter of the string to upper case, 'UpperFirstWord' sets the first letter of each word to upper case.

Char set
Set the char set of the imported string to ANSI or OEM. 'As is' saves the original string char set.

Replacements Tab

Use this tab to set the replacement list for the selected field. Fill the list in the following format:
<Value-to-find>=<Replace-with-Value>.

E.g., you set the following replacements for the field 'Continent':
'South America'='S. America'
'North America'='N. America',
that means, that all the values 'South America' of the field 'Continent' will be replaced with values 'S. America', and values 'North America' will be replaced with 'N. America' respectively.

Click Next to continue or click Back to return to the previous step.

Import Options  

Commit Options

Commit after done
Check this option to commit the transaction after import is finished.

Commit after ... records
Set a number of records, after importing which the transaction shall be committed.

Import all records
Check this option to import all records from the source table.

Import only ... first record(s)

If you don't want all the records to be imported, set a number of records to import them from the source file. In this case only this number of records (beginning from the first one) will be imported.

Import Advanced

Import Mode
Select actions performed on import by selecting an import mode.

Insert All
Inserts all the records to the table.
Insert New
Inserts only new records to the table; others are skipped. Requires defining Key Columns.
Update
Updates records with identical key column values and skips all other records. Requires defining Key Columns.
Update or Insert
Updates records with identical key column values and inserts new records. Requires defining Key Columns.
Delete
Deletes records with identical key column values and skips all other records. Requires defining Key Columns.
Delete or Insert
Deletes records with identical key column values and inserts new records. Requires defining Key Columns.


Key Columns
This tab allows you to define some of the table columns as primary key for cheking their identity on importing with mode different from Insert All.
select certain fields from the data set for exporting. If you want all the fields to be exported you can skip this tab.

To select fields, move them from the Available Fields list to the Included Fields one. To move the field from one list to another double-click it or select it (use Ctrl or Shift to select multiple fields) and click button > or <. To move all the fields click button >> or <<.

Save template to file

Use this button to save current import options (source filename, field correspondence, format options, etc) to file to fasten the process of configuring your next import.

When you are done, click Finish to start import.

See also:
Export Data Dialog
Export Data as INSERT Dialog
Copy Data from File Wizard
Copy Data to File Wizard


Availability:
Windows Professional
Yes  
Windows Lite
No  
Linux Professional
Yes (w/o MS Access)  
Linux Lite
No