View Issue Details

This bug affects 1 person(s).
IDProjectCategoryView StatusLast Update
18346Bug reportsImport/Exportpublic2022-09-14 16:01
ReportersdsAdm1n Assigned Toollehar  
Status assignedResolutionopen 
Summary18346: ERR_INVALID_RESPONSE :: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]'INSTR' is not a recognized built-in function name

I am using LS v5.0.5+210621 using MS SQL Server, one of the surveys i have is returning an error while exporting the responses to SPSS format.
the error is " [error] [system.db.CDbCommand] CDbCommand::fetchColumn() failed: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]'INSTR' is not a recognized built-in function name. The SQL statement executed was: SELECT MAX(CASE
WHEN INSTR([123456X257X142881_SQ002], '.') THEN CAST(SUBSTRING_INDEX(123456X257X142881_SQ002], '.', -1) as UNSIGNED)
FROM lm_survey_123456.

Clearly the issue is caused by using unsupported INSTR and SUBSTRING_INDEX functions in MS SQL Server queries .
for your information the affected question type in Array(Numeric).

hope a fix can be provided for this version since upgrading to the latest version is critical to us as per our current time and situation.

Steps To Reproduce

Steps to reproduce

Create a survey with Array(number) question. launce as token-based
try to export responses in SPSS file format

Expected result

getting the syntax and data files required

Actual result

error is showing instead

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.0.5+210621
I will donate to the project if issue is resolvedNo
Database type & versionMS SQL Server 2016
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4

Users monitoring this issue

User List There are no users monitoring this issue.




2022-09-14 12:11

administrator   ~71720

Please update to the latest version and check if the bug can still be reproduced. Thank you.

Issue History

Date Modified Username Field Change
2022-09-13 10:07 sdsAdm1n New Issue
2022-09-14 12:11 ollehar Assigned To => ollehar
2022-09-14 12:11 ollehar Status new => feedback
2022-09-14 12:11 ollehar Note Added: 71720
2022-09-14 12:11 ollehar Bug heat 0 => 2
2022-09-14 16:01 sdsAdm1n Bug heat 2 => 4
2022-09-14 16:01 sdsAdm1n Status feedback => assigned