Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Error CDbCommand failed to excute the SQL statement: SQLSTATE[42S22]

  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 5 months ago #218968 by torilee93
Yes. I am on Limesurvey 3.27.10 trying to update to 5.1.3
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
3 years 5 months ago #218969 by ollehar
> Yes, after restoring from a previous backup, I was able to navigate throughtout limesurvey without any issues.

So it's working now? Did you try to restore from LS3 when upgrading to LS5?
The topic has been locked.
  • GuernseyResearch
  • GuernseyResearch's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 5 months ago #218970 by GuernseyResearch
I did a fresh install of 3.27.12 on our test server and then used comfortupdate to move it to 5.1.3 with no toruble. It did the files and then asked to do the database. Once updated everything appears fine.
The topic has been locked.
  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 5 months ago #218971 by torilee93
Limesurvey works fine when I restored to LS3. It lets me update to 5.1.3 but then when it asks to update the database I run into the error.
The topic has been locked.
  • GuernseyResearch
  • GuernseyResearch's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
3 years 5 months ago #218972 by GuernseyResearch
Before you do the upgrade do a "Data integrity" check from the Configuration menu.

My database upgrade was quick.
The topic has been locked.
More
3 years 5 months ago #218975 by nooblag
Hi everyone, I'm not sure if this is related, but I'm getting this error whenever I try to Export Results of a survey:

```
500: Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42803]: Grouping error: 7 ERROR: column "lime_survey_873476.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 5: ORDER BY "lime_survey_873476"."id" ASC
^
```

I've done the Data consistency check and Data redundancy check in Lime Survey admin and still this occurs.System configuration:
  • LimeSurvey version5.1.3
  • LimeSurvey buildgithub
  • Operating systemLinux s1.mals.cloud 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 06:54:29 UTC 2021 x86_64
  • PHP version7.4.22
  • Web server nameq.mals.cloud
  • Web server softwarenginx/1.18.0
  • Web server infoHTTP/1.1
  • Database driverpgsql
  • Database driver version10.17 (Ubuntu 10.17-0ubuntu0.18.04.1)
  • Database server infoPID: 36791; Client Encoding: UTF8; Is Superuser: off; Session Authorization: limesurvey; Date Style: ISO, MDY
  • Database server version10.18 (Ubuntu 10.18-0ubuntu0.18.04.1)

 
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
3 years 5 months ago #218984 by ollehar
Hi @nooblag, thanks for your report. Can you add it to our bug tracker at bugs.limesurvey.org, please?
The topic has been locked.
More
3 years 5 months ago #218986 by nooblag
Okay, for sure. Thanks for confirming it's a bug rather than a config problem.
The topic has been locked.
More
3 years 5 months ago #218987 by nooblag
Actually, sorry, I'm having trouble figuring out how to file a report at bugs.limesurvey.org. I don't have a login for it, so I tried the anonymous option, but I still cannot find any ability to open a new ticket...
The topic has been locked.
  • ollehar
  • ollehar's Avatar
  • Offline
  • LimeSurvey GmbH Employee
  • LimeSurvey GmbH Employee
More
3 years 5 months ago #218988 by ollehar
Same user as for the forum. :) Just log out the guest account first.
The topic has been locked.
More
3 years 5 months ago #218989 by nooblag
Ooop. Ignore all that. It was a problem with my account.limesurvey.org login.

I managed to file a report. #17522

Thank you!
The topic has been locked.
  • torilee93
  • torilee93's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 5 months ago #218999 by torilee93
Thanks for the advice. I did a data integrity check and everything seemed fine. (Attached screenshot)
I tried the update and saw a screen that said "Checking existing limesurvey files". I clicked continue and when limesurvey asked to update the database, I ran into the error.
 
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose