Home
SQL File Import online help Prev Page Prev Page
Introduction
About SQL File Import
Version history
Contact us
Supported database engines
Using SQL File Import
Home page
Task Wizard
Select source data
Files as source data
CSV source data files
Excel source data files
Enter file search patterns
Connect to database
Conecting to databases directly without client libraries installed
Connecting to an Oracle database
Database scripts
Select table to upload into
Map data to table columns
Review script results
Transaction options
Logging options
Finalise
Run task
Scheduling a task
Options
Scripting
Global variables
OnBeforeUpload function
OnAfterUpload function
Support functions
Data functions
Log functions
String functions
Date and time functions
Date-Time format strings
File functions

Scripting

The scripting feature (Pascal-like) adds lots of new possibilities to customize your import process. Some conventions about the scripting language are as follows:

· it is not case sensitive  
· every code block is surrounded by a begin..end block  
· each statement must end with a semi-colon e.g. a := 2;  
· assignment operators use the following form (:=) e.g. a := 2;  
· string are enclosed in single quotes e.g. aVariable := 'A String';  

For each column that you import data into, you can use scripts to dynamically change the value where required. This is done in the OnBeforeUpload
function, which occurs before the data is imported into the table. There is also an OnAfterUpload function, which is called after the entire row has been imported into the table.

To get started on scripting, see the sample tasks to get an idea of how scripts can be used to dynamically generate values and change the source data before it is imported into the database.

If you require help on scripting, you can post your question on our support forum at http://www.yohz.com/support/index.php
, or contact us directly at support@yohz.com.