View Issue Details

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

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)
ELSE NULL END)
FROM lm_survey_123456.
"
REQUEST_URI=/index.php?r=admin/export/sa/exportspss/sid/123456
HTTP_REFERER=https://LIMESURVEY/index.php?r=admin/export/sa/exportspss/sid/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 heat6
Complete LimeSurvey version number (& build)5.0.5+210621
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMS SQL Server 2016
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4

Relationships

duplicate of 14986 closedcdorin spss export fails on unrecognized or invalid variable format. (error 2265) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2022-09-14 12:11

administrator   ~71720

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

c_schmitz

c_schmitz

2022-09-27 21:25

administrator   ~71988

See https://github.com/LimeSurvey/LimeSurvey/pull/1296/files

sdsAdm1n

sdsAdm1n

2022-09-30 06:25

reporter   ~72024

Thanks a lot , will try it on my application

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
2022-09-27 21:25 c_schmitz Note Added: 71988
2022-09-27 21:25 c_schmitz Bug heat 4 => 6
2022-09-27 21:26 c_schmitz Relationship added duplicate of 14986
2022-09-27 21:26 c_schmitz Status assigned => closed
2022-09-27 21:26 c_schmitz Resolution open => duplicate
2022-09-30 06:25 sdsAdm1n Note Added: 72024