data exchange wizard user manual

Upload: glov11

Post on 06-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Data Exchange Wizard User Manual

    1/59

    Data Exchange Wizard User Manual

    DB Software Laboratory 1999-2006

    www.dbsoftlab.com

  • 8/3/2019 Data Exchange Wizard User Manual

    2/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 2 of 59DB Software Laboratory

    Contents

    Contents.......................................................................................................................................2

    1. Introduction .............................................................................................................................4

    2. Requirements........................................................................................................................... 43. Key features.............................................................................................................................5

    Data Import..............................................................................................................................5

    Data Export..............................................................................................................................6

    4. Data Exchange Wizard Architecture.......................................................................................7

    5. Importing Data ........................................................................................................................7

    5. Importing Data ........................................................................................................................8

    Working with Data Exchange Wizard..................................................................................... 9

    Welcome page .....................................................................................................................9

    Load Configuration ............................................................................................................. 9

    Operation Type..................................................................................................................10Data Source Type ..............................................................................................................10

    Text Files...........................................................................................................................11

    File Format ........................................................................................................................11

    Cross Table........................................................................................................................12

    Excel Files .........................................................................................................................12

    ODBC Data Source ...........................................................................................................13

    Source is Table(s)..............................................................................................................14

    Source is a Select Statement..............................................................................................15

    Query Builder ....................................................................................................................16

    Mapping Screen Overview................................................................................................19

    Main tool bar .....................................................................................................................20Source tool bar...................................................................................................................20

    Mapping panel...................................................................................................................20

    SQL Statements.................................................................................................................21

    Logging Options................................................................................................................22

    Data Preview .....................................................................................................................23

    Ready.................................................................................................................................24

    Processing Data .................................................................................................................25

    Log.....................................................................................................................................26

    Rejected Records...............................................................................................................27

    Save Configuration............................................................................................................ 28

    Data Mapping....................................................................................................................29

    Auto mapping....................................................................................................................29

    Checking Mapping ............................................................................................................30

    How to clear mapping .......................................................................................................31

    Loading data from the Cross table ....................................................................................32

    Performing Calculations....................................................................................................34

    Filtering Data.....................................................................................................................35

    Updating/Deleting Records ...............................................................................................37

    6. Target Database Specific Parameters ....................................................................................39

    MS SQL Server parameters...............................................................................................39

    Oracle parameters..............................................................................................................397. Exporting Data ......................................................................................................................40

    Source Connecion..............................................................................................................41

  • 8/3/2019 Data Exchange Wizard User Manual

    3/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 3 of 59DB Software Laboratory

    Source is Table(s)..............................................................................................................42

    Source is a Select Statement..............................................................................................44

    Query Builder ....................................................................................................................45

    Logging Options................................................................................................................46

    Ready.................................................................................................................................47

    Processing Data .................................................................................................................47Log.....................................................................................................................................48

    Save Configuration............................................................................................................ 48

    8. Import Functions ...................................................................................................................49

    String Functions ....................................................................................................................49

    Numeric Functions ................................................................................................................51

    Date Functions.......................................................................................................................52

    Conversion Functions............................................................................................................53

    Miscellaneous Functions .......................................................................................................54

    9. Date formats ..........................................................................................................................55

    10. Using Command Line Interface ..........................................................................................56

    11. Support Procedure ...............................................................................................................5712. License Agreement..............................................................................................................58

  • 8/3/2019 Data Exchange Wizard User Manual

    4/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 4 of 59DB Software Laboratory

    1. Introduction

    Data Exchange Wizard is a easy to use tool designed to help end user to import and export

    data between different various data sources and targets.

    2. Requirements

    Below is a List of Software that must be installed before installation of Data Exchange

    Wizard:

    Software Version Notes

    Microsoft Windows 98 or higher

    MDAC 2.6 or higher Part of OS on W2K,

    XPSQL ODBC driver 2000.81.9041.40 Part of OS on W3K,

    XP

    Only to work with MS

    SQL Server

    Oracle Client 7.3.4 or higher Provided by Oracle Only to work with

    Oracle database

    Note:

    Depending on the user requirement you may or may not need to have all the software

    components installed

  • 8/3/2019 Data Exchange Wizard User Manual

    5/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 5 of 59DB Software Laboratory

    3. Key features

    Data Import

    Data targets:

    Oracle 7-9i database (using OCI API)

    SQL server 7- 2000 (using BCP API)

    ODBC source (Using ODBC API)

    Data sources:

    Text files

    Any ODBC source

    Multiple Files or Tables

    Also:

    Great performance - hundreds of records per second

    Comprehensive Error log

    Rejected records file

    Integrated Expressions builder

    Data Preview

    Allows the user to perform calculation during the loading process such as fields splitting,

    concatenations, data formatting, and ability to load cross tables.

    Oracle

    There are two ways of loading available:

    Oracle direct path loading

    Conventional path

    SQL server

    This software uses the same API as Microsoft DTS service.

  • 8/3/2019 Data Exchange Wizard User Manual

    6/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 6 of 59DB Software Laboratory

    Data Export

    Data Sources:

    Oracle 7-9i database (using OCI API) SQL server 7- 2000 (using BCP API)

    ODBC source (Using ODBC API)

    Multiple tables

    Data Targets:

    Flat files

  • 8/3/2019 Data Exchange Wizard User Manual

    7/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 7 of 59DB Software Laboratory

    4. Data Exchange Wizard Architecture

    Data TargetsData Sources

    OCI API

    BCP API

    ODBC

    API

    Data Exchange

    Wizard

    Importing Data

    Flat Files

    ODBC

    Oracle

    SQL Server

    ODBC

    Data Exchange

    Wizard

    Exporting Data

    Data TargetsData Sources

    Flat Files

    ODBC

    SQL Server

    Oracle

    Multiple files or tables

  • 8/3/2019 Data Exchange Wizard User Manual

    8/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 8 of 59DB Software Laboratory

    5. Importing Data

    Calculation?

    No Errors?

    Result Is Null or Blank

    Calcualte Field Val ue

    Apply Date Format

    Reject If Null ?

    Set to default If Null?

    Ignore If Null ?

    Date Format Defined?

    Set To Defaul t if Error

    Set To Nul l If Error

    Reject If Error

    Reject Record

    Reject If Error

    Set To Nul l If Error

    Set To Defaul t if Error

    Set to default If Null?

    Assign Source Field to T arget Field

    Continue to the next Field

  • 8/3/2019 Data Exchange Wizard User Manual

    9/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 9 of 59DB Software Laboratory

    Working with Data Exchange Wizard

    To start Data Exchange Wizard Click Start -> All Programs -> DB Software Laboratory ->

    Data Exchange Wizard -> Data Exchange Wizard

    Welcome page

    This is how Data Exchange Wizard looks like once it is startedPress the Next button to proceed to the next page

    Load Configuration

    You may choose to open previously created configuration or open existing one

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    10/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 10 of 59DB Software Laboratory

    Operation Type

    Select appropriate operation type

    Press the Next button to proceed to the next page

    Data Source Type

    Select data source type and Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    11/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 11 of 59DB Software Laboratory

    Depending on your choice you will see one of the following pages

    Text FilesSelect File name and if you want to load data from several files specify mask

    Data Exchange Wizard will search for files where selected file is located

    Press the Next button to proceed to the next page

    File Format

    Select File format and fill in Text Qualifier and Delimiter

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    12/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 12 of 59DB Software Laboratory

    Cross Table

    Select appropriate options (for more information see Loading data from a cross table)

    Press the Next button to proceed to the next page

    Excel FilesSelect File name and if you want to load data from several files specify mask

    Data Exchange Wizard will search for files where selected file is located

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    13/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 13 of 59DB Software Laboratory

    Select Excel Sheet and

    Press the Next button to proceed to the next page

    ODBC Data Source

    Fill in Data Source Name, User Name, Password

    Test Connection and

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    14/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 14 of 59DB Software Laboratory

    Specify whether your Source is table or Select Statement

    Press the Next button to proceed to the next page

    Depending on your choice you will see one of the following pages

    Source is Table(s)

    Select table(s) you want lo load data from or alternatively specify a mask to find tablesPress the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    15/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 15 of 59DB Software Laboratory

    Source is a Select Statement

    Fill in a Select Statement you want to load data from

    Or alternatively use Query builder to generate Sql

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    16/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 16 of 59DB Software Laboratory

    Query Builder

    F

  • 8/3/2019 Data Exchange Wizard User Manual

    17/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 17 of 59DB Software Laboratory

    On this step you should enter all necessary settings to connect to the target database

    First select Database Type, than fill in

    Server name for MS Sql Server Connection

    TNS Name for Oracle Connection

    DSN Name for ODBC Connection

    Fill in User Name and Password

    Fill in Database name for MS Sql Server Connection

    Fill in Table name to load data into

    Test connection to make sure it is working

    Fill in Sql Statements Separator and

    Press the Next button to proceed to the next page

    Note:

    For more information see Target Database specific parameters

  • 8/3/2019 Data Exchange Wizard User Manual

    18/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 18 of 59DB Software Laboratory

    Select Appropriate Transformation type

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    19/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 19 of 59DB Software Laboratory

    Mapping Screen Overview

    Main Tool bar

    Source tool bar

    Mapping PanelTarget table fields list

    Target Fields

    Source fields

    Source data

    Source table

    Field No

    Field Width

  • 8/3/2019 Data Exchange Wizard User Manual

    20/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 20 of 59DB Software Laboratory

    Main tool bar

    1 2 3 4

    1. Refreshes fields list from the database2. Checks script for the errors3. Allows user to clear field mapping4. Hides mapping panel

    Source tool bar

    1 2 3 4 5 6 7

    1. Refreshes Source data2. Adds new column3. Deletes last column4. Auto map the source fields to the target fields5. Filter6. Sources file name/ table name7. Number of records to show in grid

    Mapping panel

    Mapping panel is designed to provide user with all information related to the mapping of one

    particular field. There are two ways of mapping: direct and through calculations.

    Alternately you may hide Mapping panel and use grid to perform mapping.

    Default value

    Mapping typeSource Field

    Errors Handling

  • 8/3/2019 Data Exchange Wizard User Manual

    21/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 21 of 59DB Software Laboratory

    See the picture below

    Once mapping is completed Press the Next button to proceed to the next page

    Note

    See next chapter for more information about mapping

    SQL Statements

    Data Exchange Wizard provides functionality to perform SQL statements before and after data

    import or export.

    Note:

    In order to Execute several SQL statements user must specify SQL delimiter

    No select statements allowed

  • 8/3/2019 Data Exchange Wizard User Manual

    22/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 22 of 59DB Software Laboratory

    Logging Options

    Check default options and

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    23/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 23 of 59DB Software Laboratory

    Data Preview

    This is how data will look like once it is imported into the database

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    24/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 24 of 59DB Software Laboratory

    Ready

    We are now ready to load data into the database

    Check the information presented and

    Press the Next button to start loading data

  • 8/3/2019 Data Exchange Wizard User Manual

    25/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 25 of 59DB Software Laboratory

    Processing Data

    At this step data is being loaded into the database

    You may stop import any time by clicking Stop

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    26/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 26 of 59DB Software Laboratory

    Log

    Once data is loaded it vital to check the log file for any errors

    Press the Next button to proceed to the next page.

  • 8/3/2019 Data Exchange Wizard User Manual

    27/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 27 of 59DB Software Laboratory

    Rejected Records

    Examine Rejected records

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    28/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 28 of 59DB Software Laboratory

    Save Configuration

    Now when import is completed end user can choose to save the configuration

    Click finish to close Data exchange wizard.

  • 8/3/2019 Data Exchange Wizard User Manual

    29/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 29 of 59DB Software Laboratory

    Data Mapping

    Select Fist field in the Data Target fields list and drag and drop it above [CUSTOMERID]

    field.

    You may change field mapping by using mapping panel at any time.

    Auto mapping

    If the Data Source and Data Target have got the same fields names you may use Auto map

    feature.

    Click , Click yes.

  • 8/3/2019 Data Exchange Wizard User Manual

    30/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 30 of 59DB Software Laboratory

    Checking Mapping

    Once mapping is completed it is important to check it by clicking button.

    We have to correct the error first.

    Date format is missing

  • 8/3/2019 Data Exchange Wizard User Manual

    31/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 31 of 59DB Software Laboratory

    How to clear mapping

    Click .

    Click on the field you would like to clear

  • 8/3/2019 Data Exchange Wizard User Manual

    32/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 32 of 59DB Software Laboratory

    Loading data from the Cross table

    Let us say we have table like the following in the database:

    No Field Data Type1 CUSTOMERID CHAR

    2 YEAR DECIMAL

    3 MONTH DECIMAL

    4 PRODUCTID DECIMAL

    5 AMOUNT DECIMAL

    And a text file like the one below:

    Year

    CustomerID

    ProductID

    Month_1Qty_1

    Month_12

    Qty_12

    On the cross table page check Source file is a Cross table check box and set First Field to 4,

    Blocks to 12 and Block length to 2

  • 8/3/2019 Data Exchange Wizard User Manual

    33/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 33 of 59DB Software Laboratory

    Finally we are ready to import data

    Click to load data into the database

  • 8/3/2019 Data Exchange Wizard User Manual

    34/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 34 of 59DB Software Laboratory

    Performing Calculations

    Data Exchange Wizard is capable of performing calculations during import.

    To perform a simple calculation set mapping type to calculation and type constant or formulainto calculation edit box

    For character type fields type '12' or "12''

    Multiplying fields

    [INTEGER_F]*[FLOAT_F]

    Concatenation

    "[INTEGER_F]"+ " kilos"More complicated examples

    Iif([FLOAT_F]>[INTEGER_F],1,2)

    Trim('[CHAR_F]')

    You may also use an Expression Editor.

  • 8/3/2019 Data Exchange Wizard User Manual

    35/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 35 of 59DB Software Laboratory

    Filtering Data

    User may filter records using the following example:

    F1=1 Customer information

    F1=2 Invoices

    Filter

  • 8/3/2019 Data Exchange Wizard User Manual

    36/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 36 of 59DB Software Laboratory

    If you want to use multiple criteria use following example

    ([F1]==1) || ([F1]==56)

    Where

    || - OR

    && - AND

    ! - NOT

  • 8/3/2019 Data Exchange Wizard User Manual

    37/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 37 of 59DB Software Laboratory

    Updating/Deleting Records

    In order to Update or Delete records you must specify update key.

    For the example provided below, Data Exchange Wizard will execute the following SQL

    (Update key is CustomerId, OrderNo)

    Add New and Update Old Records

    Select count(*)

    from [DEMO].[dbo].[orders]where CustomerId=? And OrderNo=?

    If any records found Data Exchange Wizard will update them by executing

    Update [DEMO].[dbo].[orders]

    set orderdate=?,

    amount=?

    where customerid=? And OrderNo=?

    If no records found Data Exchange Wizard will add new records

  • 8/3/2019 Data Exchange Wizard User Manual

    38/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 38 of 59DB Software Laboratory

    Updating Records

    Update [DEMO].[dbo].[orders]

    set OrderDate=?,

    Amount=?

    where CustomerId=? And OrderNo=?

    Deleting Records

    Delete from [DEMO].[dbo].[orders]

    Where CustomerId=? And OrderNo=?

    Note:

    Add New and Update Old Records is not supported for SQL Server Connection use ODBC

    connection instead.

    Update key

  • 8/3/2019 Data Exchange Wizard User Manual

    39/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 39 of 59DB Software Laboratory

    6. Target Database Specific Parameters

    MS SQL Server parameters

    Check constraints

    Ensure that any constraints on the destination table are checked during the bulk copy

    operation. By default, constraints are ignored.

    Keep identity

    Specify that there are values in the data file for an identity column.

    Keep NULLS

    Specify that any columns containing a null value should be retained as null values, even if a

    default value was specified for that column in the destination table.

    Batch size

    Specify the number of rows in a batch. The default is the entire data file.

    The following values for the Batch size property have these effects:

    If you set Batch size to zero, the data is loaded in a single batch. The first row that fails will

    cause the entire load to be cancelled, and the step fails.

    If you set Batch size to one, the data is loaded a row at a time. Each row that fails is counted

    as one row failure. Previously loaded rows are committed.

    If you set Batch size to a value greater than one, the data is loaded one batch at a time. Any

    row that fails in a batch fails that entire batch; loading stops and the step fails. Rows in

    previously loaded batches are either committed or, if the step has joined the package

    transaction, provisionally retained in the transaction, subject to later commitment or rollback.

    Oracle parameters

    The box above allows you to specify Conventional and Direct path loading

  • 8/3/2019 Data Exchange Wizard User Manual

    40/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 40 of 59DB Software Laboratory

    7. Exporting Data

    Once Data Exchange Wizard is started on Operation Type Page select operation type >

    Export data.

    Press the Next button to proceed to the next page

    Select Text Qualifier and Delimiter.Press the Next button to proceed to the next

    page

  • 8/3/2019 Data Exchange Wizard User Manual

    41/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 41 of 59DB Software Laboratory

    Source Connecion

    On this step you should enter all necessary settings to connect to the source database

    First select Database Type, than fill in

    Server name for MS Sql Server Connection

    TNS Name for Oracle Connection

    DNS Name for ODBC Connection

    Fill in User Name and Password

    Fill in Database name for MS Sql Server Connection

    Test connection to make sure it is working

    Fill in Sql Statements Separator and

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    42/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 42 of 59DB Software Laboratory

    Specify whether your Source is table or Select Statement

    Press the Next button to proceed to the next page

    Depending on your choice you will see one of the following pages

    Source is Table(s)

    Select table(s) you want lo load data from or alternatively specify a mask to find tablesPress the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    43/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 43 of 59DB Software Laboratory

    SQL Statements

    Data Exchange Wizard provides functionality to perform SQL statements before and after data

    export.

    Note: In order to Execute several SQL statements user must specify SQL delimiter

    No select statements allowed

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    44/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 44 of 59DB Software Laboratory

    Fill in Directory Name you want to export data into

    Every table will be saved into separate file

    Press the Next button to proceed to the next page

    Source is a Select Statement

    Fill in a select Statement you want to load data from

    Or alternatively use Query builder to generate Sql

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    45/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 45 of 59DB Software Laboratory

    Query Builder

  • 8/3/2019 Data Exchange Wizard User Manual

    46/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 46 of 59DB Software Laboratory

    Fill in File Name you want to export data into

    Press the Next button to proceed to the next page

    Logging Options

    Check default options and

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    47/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 47 of 59DB Software Laboratory

    Ready

    We are now ready to export data from the database

    Check the information presented and

    Press the Next button to start exporting data

    Processing Data

    At this step data is being exported from the databaseYou may stop export any time by clicking Stop

    Press the Next button to proceed to the next page

  • 8/3/2019 Data Exchange Wizard User Manual

    48/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 48 of 59DB Software Laboratory

    Log

    Once data is exported it vital to check the log file for any errors

    Press the Next button to proceed to the next page.

    Save Configuration

    Now when export is completed end user can choose to save the configurationClick finish to close Data exchange wizard.

  • 8/3/2019 Data Exchange Wizard User Manual

    49/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 49 of 59DB Software Laboratory

    8. Import Functions

    String Functions

    Trim

    Trim(String):string

    Trims leading and trailing spaces from a string.

    TrimLeftTrimLeft(String):string

    Trims leading spaces from a string.

    TrimRight

    TrimRight(String):string

    Trims trailing spaces from a string.

    UpperCaseUpperCase(String):string

    UpperCase returns a string with the same text as the string passed in, but with all letters

    converted to Uppercase

    LowerCaseLowerCase(String):string

    LowerCase returns a string with the same text as the string passed in, but with all letters

    converted to LowerCase

    ReplaceReplace(String,OldPattern,NewPattern):string

    Replace replaces all occurrences of the OldPattern by NewPattern within the String

    SubStringSubString(String,Index,Count):string

    SubString returns a substring containing Count characters or elements starting from Index.

    RightStringRightString(String,Count):string

    RightString returns the trailing characters of String up to a length of Count characters

    LeftStringLeftString(String,Count):string

  • 8/3/2019 Data Exchange Wizard User Manual

    50/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 50 of 59DB Software Laboratory

    LeftString returns the leading characters of String up to a length of Count characters

    AddCharLeftAddCharLeft(Char,String,Count):string

    AddCharLeft returns a string left-padded to Length with characters Char

    AddCharRightAddCharRight(Char,String,Count):string

    AddCharRight returns a string right-padded to Length with characters Char

    MakeStringMakeString(Char,Count):string

    MakeString returns a string of Count filled with character Char.

    DelSpacesDelSpaces(String):string

    DelSpaces returns string with all spaces deleted except one.

    "two spaces"->"two spaces

    DeleteDelete(String,Index,Count):String

    DelSpaces returns string with count characters deleted starting from index.

    InsertInsert(Source,S,Index):String

    Insert returns string with s string inserted in index.

    ProperCaseProperCase(String):string

    ProperCase returns string, with the first letter of each word in uppercase and all other letters in

    lowercase

    "proper case"->"Proper Case"

  • 8/3/2019 Data Exchange Wizard User Manual

    51/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 51 of 59DB Software Laboratory

    Numeric Functions

    AbsAbs(Integer):Integer

    Abs returns the absolute value of the argument

    RoundRound(Float,Integer):Float

    Use Round to round Value to a specified power of ten.

    The following examples illustrate the use of Round:

    Expression Value

    Round(1234567, 3) 1234000

    Round(1.234, -2) 1.23

    Round(1.235, -2) 1.24

    Round(1.245, -2) 1.24

    SignSign(Integer): Integer

    Use Sign to test the sign of a numeric value.Sign returns

    0 if AValue is zero.

    1 if AValue is greater than zero.

    -1 if AValue is less than zero.

  • 8/3/2019 Data Exchange Wizard User Manual

    52/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 52 of 59DB Software Laboratory

    Date Functions

    DayDay(Date,Format):Integer.

    Use Day to get the day part of a date value.

    Day('01012003','DDMMYYYY')

    HourHour(Date,Format):Integer.

    Use Hour to get the hour part of a date value.

    Hour('01012003','DDMMYYYY')

    MinuteMinute(Date,Format):Integer.

    Use Minute to get the minute part of a date value.

    Minute('01012003','DDMMYYYY')

    Month

    Month(Date,Format):Integer.

    Use Month to get the month part of a date value.

    Month('01012003','DDMMYYYY')

    SecondSecond(Date,Format):Integer.

    Use Second to get the second part of a date value.

    Second('01012003','DDMMYYYY')

    YearYear(Date,Format):Integer.

    Use Year to get the year part of a date value.

    Year('01012003','DDMMYYYY')

  • 8/3/2019 Data Exchange Wizard User Manual

    53/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 53 of 59DB Software Laboratory

    Conversion Functions

    IntegerToStringIntegerToString(Integer): String.

    IntegerToString converts integer value to string value.

    NumberToStringNumberToString(Float): String

    NumberToString converts float value to string value.

    StringToIntegerStringToInteger(String): Integer

    StringToInteger converts string value to integer value.

    StringToNumberStringToNumber(String): Float

    StringToNumber converts string value to float value.

  • 8/3/2019 Data Exchange Wizard User Manual

    54/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 54 of 59DB Software Laboratory

    Miscellaneous Functions

    IifIif(expr1==expr2,expr3,expr4)

    Iif function returns expr3 or expr4 depending on expr1==expr2

    GetSystemVariableGetSystemVariable('VARIABLENAME'):string

    GetSystemVariable returns value of 'VARIABLENAME'.

    Possible values for 'VARIABLENAME' are:

    COMPUTERNAME,OSUSERNAME,

    DBUSERNAME,

    BLOCKNUMBER,

    LINENUMBER,

    RECORDNUMBER,

    SYSTEM_DATE

    PosPos(Substr,String): Integer

    Pos searches for Substr within String and returns an integer value that is the index of the first

    character of Substr within String. Pos is case-sensitive. If Substr is not found, Pos returns zero.

    GetFileHeaderLineGetFileHeaderLine(LineNumber): String

    GetFileHeaderLine function returns header line LineNumber from the source text file

  • 8/3/2019 Data Exchange Wizard User Manual

    55/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 55 of 59DB Software Laboratory

    9. Date formats

    Date/Time format strings control the conversion of strings into date time type.

    Date/Time format strings are composed from specifiers which describe values to be convertedinto the date time value.

    In the following table, specifiers are given in lower cases. Case is ignored in formats, except

    for the "am/pm" and "a/p" specifiers.

    Specifier Description

    d Day as a number without a leading zero (1-31).

    dd Day as a number with a leading zero (01-31).

    m Month as a number without a leading zero (1-12).

    mm Month as a number with a leading zero (01-12).

    mmm Month as an abbreviation (Jan-Dec).

    mmmm Month as a full name (January-December).

    yy Year as a two-digit number (00-99).

    yyyy Year as a four-digit number (0000-9999).

    h Hour without a leading zero (0-23).

    hh Hour with a leading zero (00-23).

    n Minute without a leading zero (0-59).

    nn Minute with a leading zero (00-59).

    s Second without a leading zero (0-59).

    ss Second with a leading zero (00-59).

    tt Uses the 12-hour clock for the precedingh orhh specifier, 'am' for any hour

    before noon, and 'pm' for any hour after noon.

  • 8/3/2019 Data Exchange Wizard User Manual

    56/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 56 of 59DB Software Laboratory

    10. Using Command Line Interface

    Use DEWizard.exe configuration file to run Data Exchange Wizard from the command line

    Data Exchange Wizard will load configuration file and execute it immediately, onceexecution is completed it will close itself.

  • 8/3/2019 Data Exchange Wizard User Manual

    57/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 57 of 59DB Software Laboratory

    11. Support Procedure

    Should you require any support please send an email with the following information to

    [email protected]

    1. Version number

    2. Example of data you are trying to load

    3. Script to create a table

    4. Database version

    5. Operation system version

    6. Description of a problem

  • 8/3/2019 Data Exchange Wizard User Manual

    58/59

    Data Exchange Wizard User Manual

    Version 3

    Issue 2 58 of 59DB Software Laboratory

    12. License Agreement

    Data Exchange Wizard by

    DB Software Laboratory

    www.dbsoftlab.com

    [email protected]

    END-USER LICENSE AGREEMENT FOR THIS SOFTWAREIMPORTANT - READ CAREFULLY:

    This End-User License Agreement ("EULA") is a legal agreement between you (eitheran individual or a single entity) and DB Software Laboratory for the SOFTWAREPRODUCT identified above, which includes computer software and may includeassociated media, printed materials, and "online" or electronic documentation. Byinstalling, copying, or otherwise using the SOFTWARE PRODUCT, you agree to bebound by the terms of this EULA. If you do not agree to the terms of this EULA, youmay be subject to civil liability if you install and use this SOFTWARE PRODUCT.

    SOFTWARE PRODUCT LICENSE

    The SOFTWARE PRODUCT is protected by copyright laws and internationalcopyright treaties, as well as other intellectual property laws and treaties.

    The SOFTWARE PRODUCT is licensed, not sold.

    INSTALLATION AND USAGE

    -If this is an EVALUATION VERSION of the SOFTWARE PRODUCT, you may copyand distribute an unlimited number of copies of the SOFTWARE PRODUCT; providedthat each copy shall be a true and complete copy, including all copyright andtrademark notices, and shall be accompanied by a copy of this EULA.

    If this is a REGISTERED VERSION of the SOFTWARE PRODUCT, you may installand use it for your personal use only. You may not reproduce or distribute theSOFTWARE PRODUCT for use by others.

    OTHER RIGHTS AND LIMITATIONS

    You may not reverse engineer, decompile, or disassemble the SOFTWAREPRODUCT, except and only to the extent that such activity is expressly permitted byapplicable law notwithstanding this limitation. Any such unauthorized use shall resultin immediate and automatic termination of this license and may result in criminaland/or civil prosecution. All rights not expressly granted here are reserved by DBSoftware Laboratory.

    The SOFTWARE PRODUCT is licensed as a single product. Its component parts maynot be separated for use on more than one computer.

    You may permanently transfer all of your rights under this EULA, provided therecipient agrees to the terms of this EULA.

  • 8/3/2019 Data Exchange Wizard User Manual

    59/59

    Data Exchange Wizard User Manual

    SEVERABILITY

    In the event of invalidity of any provision of this license, the parties agree that suchinvalidity shall not affect the validity of the remaining portions of this license.

    COPYRIGHT

    The SOFTWARE PRODUCT is protected by copyright laws and international treatyprovisions. All title and copyrights related to the SOFTWARE PRODUCT (includingbut not limited to any images, photographs, animations, video, audio, music, text, and"applets" incorporated into the SOFTWARE PRODUCT), the accompanying printedmaterials, and any copies of the SOFTWARE PRODUCT are owned by DB SoftwareLaboratory.

    MISCELLANEOUS

    Should you have any questions concerning this EULA, or if you desire to contact theauthor of this Software for any reason, please contact DB Software Laboratory (seecontact information at the top of this EULA).

    LIMITED WARRANTY

    DB Software Laboratory expressly disclaims any warranty for the SOFTWAREPRODUCT. The SOFTWARE PRODUCT and any related documentation is provided"as is" without warranty of any kind, either express or implied, including, withoutlimitation, the implied warranties or merchantability, fitness for a particular purpose, ornon infringement. The entire risk arising out of use or performance of the SOFTWAREPRODUCT remains with you.

    In no event shall DB Software Laboratory be liable for any damages whatsoever orrefund of any money (including, without limitation, damages for loss of businessprofits, business interruption, loss of business information, or any other pecuniaryloss) arising out of the use of or inability to use this product, even if DB SoftwareLaboratory has been advised of the possibility of such damages. Because somestates/jurisdictions do not allow the exclusion or limitation of liability for consequentialor incidental damages, the above limitation may not apply to you.

    ENTIRE AGREEMENT

    This is the entire agreement between you and DB Software Laboratory whichsupersedes any prior agreement or understanding, whether written or oral, relating tothe subject matter of this license.

    Thank you for using the Data Exchange Wizard.