Overwrite data using table (AskiaTools)

Use this feature to import data into the QES file or SQL database from an external file with data from a matching file (for example, determining the respondent's city from a post-code) when you want this operation to work with loops. Data in the QES file or SQL database will be over-written, according to the contents of the external file or table. AskiaTools reads the data in the source question, determines if there is a match in the translation table and if so, writes it in the target question.

View image

 

To overwrite data using a table:

  1. In the merge menu, select overwrite data using table.
  2. Set the options, as described below.
  3. Click OK.

In this topic:

Overwrite data using table options

When overwriting from a table, the following options are available:

Option Description

Source question

Click ..., and select the question from which you want to import data.

Target question

Click ..., and select the question into which you want to write the data.

Using ASCII table

Select this option if you want to import data based on the contents of an ASCII file. Then, select the following options:

ASCII file: Type the patch of the ASCII file, or click ... and browse to the file.

Question separator: Select the separator character used in the file (tab, comma, etc.)

Using SQL query

Select this option if you want to import data based on the contents of a SQL database. Then, set the following sub-options:

Database: Enter a reference to the database's DSN, in the following format:

;DSN=BDDASKIA

SQL query: Enter a SQL query that specifies which data you are check for matches.

Copy data even if no match: Select this option if you want to copy the data from the source even if there is no match found in the SQL table.

Update completes only Select this option if you want to update only completed interviews (incomplete interviews will be skipped over).
Interview started after

Interviews will be updated only if they started after the specified date.

Additional filter Allows you to specify a custom data filter by specifying an AskiaScript condition. Click ... to open a secondary dialog where you can define your condition.

 

Command line

This feature can be accessed via the command line. For example:

AskiaToolsu.exe "C:MyQes.qes" /overwritewithtable /sourcequestion:open1 /targetquestion:open2 /datafile:"c:myQesMatchingTable.txt" /completes
or
AskiaToolsu.exe "C:MyQes.qes" /overwritewithsql /sourcequestion:open1 /targetquestion:open2 /datafile:"myDSN" /query:"select field1,field2 FROM TABLE" /completes

If the operation is successful, AskiaTools will return 0. If there is an error with the operation, AskiaTools will return one of the following:

Create your own Knowledge Base