Use this feature to export data to an SQL database using a query.
To access this option, open the file menu and select export, then SQL table. The execute query window appears.
You can enter one or more queries to determine where the exported data is stored. In database, enter a connection string to the database you want to use. In SQL query, enter your query string. For example:
INSERT INTO DATA (Label,SourceID) VALUES('??Email??',??ID??)
To enter multiple queries, separate them with a semi-colon (;). You can refer to variables in your data as you normally would in the Askia software, by using special characters like ?? (e.g. ??Email=??), !! and even {% %}.
You can limit the set of interviews that are exported by using the options in the execute query window.
In this topic:
The following options in the SQL table window determine which interviews will be exported:
| Incompletes | Select this option if you want to include incomplete interviews in the export. |
|
Export completes only |
Select this option if you want to include completed interviews in the export. |
|
Interview started after (including) |
Allows you to export only interviews that were begun on or after the specified date. You can, therefore, use this feature to export new data that has been collected since a previous export. |
|
Interview started after (excluding) |
Allows you to export only interviews that took place before the specified date. |
|
Additional filter |
Allows you to specify a custom data filter by specifying an AskiaScript condition. Click |
This feature is also available from the command line. For example:
AskiatoolsU.exe "C:QesMyQes.qes" /executequery /datafile:"ADO connection string " /query:"INSERT .. SET " /completes
AskiaTools returns 0 if the query was a success. If there is an error, it will return one of the following: