As we know data extraction from Lime Survey is limited. Now I got a requirement from business users to export data from SQLServer directly by running a SQL code. But when I queried in database I found some languages are stored as strange codes in database. How could I export the responses correctly without strange codes?
You are not the only one having tried to export data directly via an SQL statement and so far no one has succeeded to do so.
There are several reasons for this, e.g. Limesurvey stores answer codes instead of the full text answers to deal with multi-lingual surveys and thus several sub-queries are needed to get in all in line.
You definitely need a PHP script to do the export the data (and write it into another DB).
Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
Best regards/Beste Grüße,
Dr. Marcel Minke
survey-consulting.com
offlinesurveys.com
Feel free to contact me by email for professional LimeSurvey support!
By any chance would you have an updated version of your SQL stored procedure? When I execute it is giving me some errors creating the temp table, but I think it could be because I have a newer LimeSurvey Version 3.21.0+191203
For example,
exec [dbo].[p_CreateFieldMap] '621959'
(1 row(s) affected)
(1 row(s) affected)
(1 row(s) affected)
Msg 207, Level 16, State 1, Line 1
Invalid column name '621959X1X22SQ001'.