Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Direct MySQL database survey result access

  • UniversityOfCologne_SeminarForOrganizationalDevelopment
  • UniversityOfCologne_SeminarForOrganizationalDevelopment's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #140142 by UniversityOfCologne_SeminarForOrganizationalDevelopment
Direct MySQL database survey result access was created by UniversityOfCologne_SeminarForOrganizationalDevelopment
Dear fellow LimeSurvey users and administrators,

I got the following question: Is it possible to directly access survey results via SQL-Database table import function in Excel?

And similarly but connected, can numerous results from different surveys (which are identical, but rolled out to different groups over time), be saved in one comprehensive database table?`The objective is to build up a single database fed by survey results over time.

Thank you very much for your support!

Sincerely,
Steffen Runge
- University of Cologne -
The topic has been locked.
More
7 years 7 months ago - 7 years 7 months ago #140147 by Deusdeorum
Replied by Deusdeorum on topic Direct MySQL database survey result access
Directly access to the SQL database would be a security issue as far I know, however, limesurvey has an API for this kind of stuffs, not sure if you can do anything with it in excel but you can reach it with python, php, R etc. You can read more here: manual.limesurvey.org/RemoteControl_2_API

Every survey in LS creates it's own table, I dot not know if it is possible to have separate surveys but in the same database. But, with the API you could just build this comprehensive database table yourself.
Last edit: 7 years 7 months ago by Deusdeorum.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #140150 by Joffm
Replied by Joffm on topic Direct MySQL database survey result access
Hi,

you can do that.
There is a data table for each survey called [chosen prefix]_survey_[surveyID], e.g. "lime_survey_123456"
And with "phpMyAdmin" or another database tool you can export this table to several formats, also EXCEL.

And with some SQL statements you can join your tables into one.
Like:
CREATE TABLE newtable AS SELECT * FROM table1;

INSERT INTO newtable
SELECT * FROM table1
UNION
SELECT * FROM table2
UNION ...

So you are free to use all SQL features.

But remember:
Do this you will get the column headers in the SGQA terminology and not your Question codes.
See this topic www.limesurvey.org/de/foren/development/...-qcode-database-view

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose