View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
04915Bug reportsSurvey takingpublic2011-09-20 16:02
Reporteruser11833Assigned Toc_schmitz  
PrioritynormalSeverityblock 
Status closedResolutionunable to reproduce 
Product Version1.91RC2 
Target Version1.91RC4Fixed in Version1.91RC4 
Summary04915: GSoC - SQL error testing survey (MS SQL Server 2005)
Description

When testing a survey, I get the following error:

[Microsoft][ODBC SQL Server Driver][SQL Server]The data types text and varchar are incompatible in the not equal to operator.:SELECT attr.qid,value FROM [lime_question_attributes] as attr right join [lime_questions] as quests on attr.qid=quests.qid WHERE attribute='random_group' and value <> '' and sid=44897 GROUP BY attr.qid

TagsNo tags attached.
Attached Files
Bug heat10
Complete LimeSurvey version number (& build)9672
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMS SQL Server 2005
Server OS (if known)Windows Server 2003 SP2
Webserver software & version (if known)IIS 6.0
PHP Version5.2.13

Relationships

related to 04913 closedc_schmitz GSoC - SQL syntax error in index.php::buildsurveysession() 

Users monitoring this issue

limech

Activities

user11833

2011-02-01 12:43

  ~14023

I have: $databasetype = 'odbc_mssql'

Resolution:

  1. Changed the column 'value' in 'lime_question_attributes' from 'text' to 'varchar(1)'

However, in MSSQL the query will still return an error since the 'value' column is specified in the SELECT but not in the GROUP BY.

So in "index.php" I changed line 2698 to:

$rgquery = "SELECT attr.qid,value FROM ".db_table_name('question_attributes')." as attr right join ".db_table_name('questions')." as quests on attr.qid=quests.qid WHERE attribute='random_group' and value <> '' and sid=$surveyid GROUP BY attr.qid, value";

user11833

2011-02-01 12:44

  ~14024

To test: load the survey in attach. Select "Test this survey"

limech

limech

2011-02-01 13:47

reporter   ~14025

The grouping error in this issue was reported yesterday in 04913. Apparently both PostgreSQL and MSSQL (correctly) reject the query, while MySQL actually accepts it, returning "something".

Mazi

Mazi

2011-02-02 12:40

updater   ~14039

Carsten, I think you are the only one who has MS SQL installed for testing?!

c_schmitz

c_schmitz

2011-02-17 18:25

administrator   ~14222

1.91RC4 released

Mazi

Mazi

2011-09-20 15:34

updater   ~16301

A user recently reported this problem at the latest 1.91 version.

Issue History

Date Modified Username Field Change
2011-02-01 12:42 user11833 New Issue
2011-02-01 12:43 user11833 File Added: limesurvey_survey_44897.lss
2011-02-01 12:43 user11833 Note Added: 14023
2011-02-01 12:44 user11833 Note Added: 14024
2011-02-01 12:46 user11833 Issue Monitored: user11833
2011-02-01 13:47 limech Note Added: 14025
2011-02-01 13:47 limech Issue Monitored: limech
2011-02-01 16:15 mdekker Target Version => 1.91RC4
2011-02-02 12:39 Mazi Relationship added related to 04913
2011-02-02 12:39 Mazi Assigned To => c_schmitz
2011-02-02 12:39 Mazi Status new => assigned
2011-02-02 12:40 Mazi Note Added: 14039
2011-02-09 16:05 Mazi Summary SQL error testing survey (MS SQL Server 2005) => GSoC - SQL error testing survey (MS SQL Server 2005)
2011-02-09 16:05 Mazi Description Updated
2011-02-11 18:53 c_schmitz Status assigned => resolved
2011-02-11 18:53 c_schmitz Fixed in Version => 1.91RC4
2011-02-11 18:53 c_schmitz Resolution open => fixed
2011-02-17 18:25 c_schmitz Note Added: 14222
2011-02-17 18:25 c_schmitz Status resolved => closed
2011-09-20 15:34 Mazi Note Added: 16301
2011-09-20 15:34 Mazi Status closed => feedback
2011-09-20 15:34 Mazi Resolution fixed => reopened
2011-09-20 16:02 c_schmitz Status feedback => closed
2011-09-20 16:02 c_schmitz Resolution reopened => unable to reproduce
2021-08-24 11:41 guest Bug heat 8 => 10