View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05325Bug reportsImport/Exportpublic2011-07-12 05:43
Reporteruser8397Assigned Toadamzammit  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.91+ 
Fixed in Version1.91+ 
Summary05325: SQL-Error on Exporting QueXML using MS SQL-Server
Description

When you are using Microsoft SQL-Server as DB and click on QueSQL you get the following Error:

SQLState: 42000 Error Code: 195 Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]'LPAD' wird nicht als Name einer integrierten Funktion erkannt. :SELECT q.*,CONCAT(LPAD(g.gid,10,'0'),LPAD(q.question_order,10,'0')) as globalorder FROM lime_questions as q, lime_questions as q2, lime_groups as g, lime_groups as g2 WHERE q.parent_qid = 0 AND q2.parent_qid = 0 AND q.sid=71831 AND q2.sid=71831 AND q2.qid = 280 AND g2.gid =q2.gid AND g.gid = q.gid AND CONCAT(LPAD(g.gid,10,'0'),LPAD(q.question_order,10,'0')) > CONCAT(LPAD(g2.gid,10,'0'),LPAD(q2.question_order,10,'0')) ORDER BY globalorder

Steps To Reproduce

Create a Survey and click on QueXML-Export

Additional Information

The Problem seems obvious as LPAD is not available in SQL-Server. Maybe you need to use some construct of Left() and Space() ..?!

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)10377
I will donate to the project if issue is resolvedNo
BrowserIE 8 and Firefox 5
Database type & versionMS SQL Server 2008 R2
Server OS (if known)Windows Server 2003
Webserver software & version (if known)IIS 6
PHP Version5.3.5

Users monitoring this issue

adamzammit

Activities

adamzammit

adamzammit

2011-07-11 03:20

developer   ~15720

Hello - I don't have an MSSQL to test this - but I think I have made it more database independent. Can you please replace the admin/export_structure_quexml.php file with the attached and see if it solves your problem.

Regards,
Adam Zammit

user8397

2011-07-11 12:41

  ~15723

Hello,

thanks for the quick response. I testet the script on our server and it seems to work. I don't get the error again amd am now able to download the Que-structure.

Thank you and regards,
Markus Kersting

adamzammit

adamzammit

2011-07-12 05:43

developer   ~15733

Fix applied in revision 10488 - should appear in the next 1.91+ release.

Issue History

Date Modified Username Field Change
2011-07-07 09:48 user8397 New Issue
2011-07-08 17:00 c_schmitz Assigned To => adamzammit
2011-07-08 17:00 c_schmitz Status new => assigned
2011-07-11 03:18 adamzammit Issue Monitored: adamzammit
2011-07-11 03:19 adamzammit File Added: export_structure_quexml.php
2011-07-11 03:20 adamzammit Note Added: 15720
2011-07-11 03:21 adamzammit Issue Monitored: user8397
2011-07-11 03:26 adamzammit File Deleted: export_structure_quexml.php
2011-07-11 03:26 adamzammit File Added: export_structure_quexml.php
2011-07-11 12:41 user8397 Note Added: 15723
2011-07-12 05:43 adamzammit Note Added: 15733
2011-07-12 05:43 adamzammit Status assigned => closed
2011-07-12 05:43 adamzammit Resolution open => fixed
2011-07-12 05:43 adamzammit Fixed in Version => 1.91+
2021-08-04 03:39 guest Bug heat 4 => 6