Welcome, Guest
Username: Password: Remember me

TOPIC: Export Survey Results/Answers To MySQL Table With Question Codes as Field Names

Export Survey Results/Answers To MySQL Table With Question Codes as Field Names 2 years 3 months ago #77343

  • steinj
  • steinj's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi,

Update: I found a solution: A product, Navicat, has a wizard that creates a table from Excel or CSV and uses the field names to automatically create column names.

I would like to be able to export from LimeSurvey the results/answers to a survey into a MYSQL table and have the field names in this table be the Limesurvey question codes. My reason for wanting to do this is that I want to do a Join with a table that is external to LimeSurvey. I realise that I can export data to Excel with the question codes being column headers; however, my Surveys typically have 100-200 questions and creating a table from the Excel file involves typing a very long "Where" statement that contains many (100-200)field names which I would like to avoid. Maybe someone knows of a way to import Excel Data into MySQL and automatically create the table's fields in MySQL....

Thanks very much.
Last Edit: 2 years 3 months ago by steinj.
The administrator has disabled public write access.

Aw: Export Survey Results/Answers To MySQL Table With Question Codes as Field Names 2 years 3 months ago #77725

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
I think the way such a script works also depends on the questio types being used. If you want to reference question codes only, then there will be problems with array or multiple choice questions because these have subquestions so your question code wouldn't be unique if you only rely on that field.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: steinj

Re: Aw: Export Survey Results/Answers To MySQL Table With Question Codes as Field Names 2 years 3 months ago #77738

  • steinj
  • steinj's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Thanks for the insight and information. Multiple choice questions are going to be a huge problem for my application due to the way that they are saved in the table. Is there a way to alter the yes/no format (of saving) and instead just store the answer that is selected?
The administrator has disabled public write access.

Aw: Re: Aw: Export Survey Results/Answers To MySQL Table With Question Codes as Field Names 2 years 3 months ago #77791

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5300
  • Thank you received: 291
  • Karma: 247
That requires changing the core file which does the saving which we don't recommend. Better create your own script foir data conversion.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Time to create page: 0.117 seconds
Donation Image