View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
03895Bug reportsSurvey participants (Tokens)public2009-11-28 13:44
Reporterjoe_p Assigned Tojcleeland  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.87RC2 
Fixed in Version1.87RC3 
Summary03895: SQL error (actually in 1.87RC3)
Description

After entering a token on the token entry screen, I get the following error:

[Microsoft][ODBC SQL Server Driver][SQL Server]The data types text and varchar are incompatible in the equal to operator.:SELECT count(qa.qaid) as afcount from [question_attributes] as qa, [questions] as q WHERE qa.qid = q.qid AND qa.attribute='array_filter' AND qa.value ='4_ProGetHC' AND q.sid=75194

Here's a fixed version:

SELECT count(qa.qaid) as afcount
from [question_attributes] as qa, [questions] as q
WHERE qa.qid = q.qid
AND qa.attribute like 'array_filter'
AND qa.value like '4_ProGetHC'
AND q.sid=75194

Additional Information

I wasn't able to select 1.87RC3 in the dropdown, but that's the version that has the error.

Also, there's no build number in version.php.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)0000
I will donate to the project if issue is resolved
BrowserFF 3.5.5
Database type & versionMS SQL Server 10.0.2531
Server OS (if known)Microsoft-IIS/6.0
Webserver software & version (if known)Windows Server 2008
PHP VersionPHP Version 5.2.11

Users monitoring this issue

There are no users monitoring this issue.

Activities

bobc55

bobc55

2009-11-24 19:18

reporter   ~10242

For SQL 2005 and newer, you can equate values if the data type is varchar(max). Without a PHP code change, change the table create script -- TEXT data type to varchar(max)

c_schmitz

c_schmitz

2009-11-26 17:27

administrator   ~10277

Last edited: 2009-11-26 17:27

The 'like' solution is elegant enough, works on all DB systems and only needed for qa.value.

jcleeland

jcleeland

2009-11-27 00:53

reporter   ~10283

SQL updated, thanks

Issue History

Date Modified Username Field Change
2009-11-24 17:01 joe_p New Issue
2009-11-24 17:01 joe_p Status new => assigned
2009-11-24 17:01 joe_p Assigned To => user372
2009-11-24 17:01 joe_p LimeSurvey build number => 0000
2009-11-24 17:01 joe_p Browser => FF 3.5.5
2009-11-24 17:01 joe_p Database & DB-Version => MS SQL Server 10.0.2531
2009-11-24 17:01 joe_p Operating System (Server) => Microsoft-IIS/6.0
2009-11-24 17:01 joe_p Webserver => Windows Server 2008
2009-11-24 17:01 joe_p PHP Version => PHP Version 5.2.11
2009-11-24 17:47 user372 Assigned To user372 => c_schmitz
2009-11-24 19:18 bobc55 Note Added: 10242
2009-11-26 17:27 c_schmitz Note Added: 10277
2009-11-26 17:27 c_schmitz Note Edited: 10277
2009-11-26 17:27 c_schmitz Assigned To c_schmitz => jcleeland
2009-11-27 00:53 jcleeland Note Added: 10283
2009-11-27 00:53 jcleeland Status assigned => resolved
2009-11-27 00:53 jcleeland Fixed in Version => 1.87RC3
2009-11-27 00:53 jcleeland Resolution open => fixed
2009-11-28 13:44 c_schmitz Status resolved => closed
2016-12-08 10:39 c_schmitz Category Tokens => Survey participants (Tokens)