Importing and exporting data from a database package

You can import data from other software packages to the current survey. The data will be added to the end of the current respondent data. The following example shows details from a spreadsheet of customer information being imported into Snap Desktop.

  1. As a precaution, archive your survey first before merging the data.
  2. From the Survey Overview window, open the survey that you want to add data to.
  3. On the Snap toolbar click Database Links DBLinksIcon.png to open the Database Links dialog.
Database links dialog
  1. Click New to open the Database Linkage Wizard which guides you through the process of creating a new database link.
  2. In the Linkage Type section, select Import from Database and then click Next
  3. Depending on the data source you have choose Select a database file or Build a database link. If the database type you need is not listed as one of the defaults in the Select Database File dialog box then you can use the Build Data Link button to create the connection.
Select the database file or build a database link
  1. Click Select Database File and browse to the file you need in the Select Database File dialog box and click Open. This example uses an Excel spreadsheet called Customers.xls.
  2. Select which area of your database contains the data to use in the Select Table area. For example, the required worksheets in a spreadsheet file.
  3. On the next page of the wizard select the type of Import/Export option you want:
    • Join cases where the link variables match
    • Only import/export data where the value in the link variable matches between the two surveys (E.g. a survey containing customer ID numbers matches the information in the link survey with the same ID number.) This imports all requested data where two ID numbers are matched, and ignores all data in cases where the ID number does not match.
    • Join matching cases and append unmatched cases
    • This option works as above, and also adds the unmatched data as new cases at the end of the file.
    • Append unmatched cases
    • This option only imports/exports cases that do not find a match between the link variable in the surveys.
    • Append all cases
    • This option imports/exports every case of data into your survey as a new data case. It does not try to match the link variables.
  4. If you select one of the first three Import/Export Options, you must set up the Link Variables options.
Select the options used to link the survey to a database

Select a database field which contains unique identifiers which identifies cases in the response data (either a unique identifier or a unique case number which matches the case number).

Select a survey variable that contains the equivalent unique identifier, or select Use Snap case number if the database you are linked to contained case numbers,.

  1. Click Next.
  2. The next step of the wizard asks which data fields you would like to import into your survey. The left column displays all of the fields from the database. The right column asks you to select the survey variables that will contain the imported data fields. You need to click each of the rows in the right hand column in order to activate the drop-down boxes.
  3. If you wish to import a field into your survey that does not already have a variable set up, select Create variable in the menu adjacent to the field you wish to import. The Create Variable dialog is displayed. The Name and Label use the database field name as a default. You can edit these. Click OK to create the new variable.
Creating a variable to link to a database
  1. Click Next.
  2. You are shown the name of the database link you have just set up and a summary of the import or export you have specified. The name and label can be modified if required. When ready, click Finish.
  3. Snap shows the Database Links dialog including the new link.
  4. If you wish to alter any part of the link, click Modify. To delete a link, click Delete. To make a copy of the link, click Clone,and then modify the new link as required.
Database links dialog showing an import link
  1. Click Run to match up the required information and fulfil the command specified. In this case, any cases that cannot be matched will be appended to the end of the case data.

When using the Database Link Wizard ensure the spreadsheet or database you have specified is not open in the background as it can cause problems when running an import or export.