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.
To overwrite data using a table:
merge menu, select overwrite data using table.Click OK.
In this topic:
When overwriting from a table, the following options are available:
| Option | Description |
|---|---|
|
Source question |
Click |
| Target question |
Click |
| 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 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. |
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: