8000 🐛 Bug: SQLITE_ERROR: no such column for lookup cols on 0.263.* · Issue #11299 · nocodb/nocodb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug: SQLITE_ERROR: no such column for lookup cols on 0.263.* #11299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
jaandrle opened this issue May 6, 2025 · 1 comment · Fixed by #11307
Closed
1 task done

🐛 Bug: SQLITE_ERROR: no such column for lookup cols on 0.263.* #11299

jaandrle opened this issue May 6, 2025 · 1 comment · Fixed by #11307

Comments

@jaandrle
Copy link
jaandrle commented May 6, 2025

Please confirm that the bug report does not already exist

  • I confirm there is no existing issue for this bug.

Steps to reproduce

Hi, I have to downgrade my docker image of nocodb to 0.262.5 as for newer version some tables don’t load. My base looks as Attachments/base …the table “Knihy” (Books) loads correctly, but views for “Přečteno” (readed) failed (for example calendar) with (docker log) error Attachments/log. All other errors seem similar (I can provide these on request). The column “Kdy (text)” on “Přečteno” is a formula (getting string from column “Kdy” of date type) and it is set as display value field. That maybe that is the issue?

PS: I also have to restore the previous version of noco.db database file, as the migrated version from 0.263.1 doesn’t work on 0.262.5. If there doesn’t suppose to be changes, there can be another are where the bug is?.

Desired Behavior

Working as for previous version(s), or provide migration information (e. g. ’key’ should not be formula type).

Project Details

Node: v22.14.0
Arch: x64
Platform: linux
Docker: true
RootDB: sqlite3
PackageVersion: 0.263.1

Attachments

base:
Image

log:

[Nest] 8  - 05/06/2025, 7:29:13 AM     LOG [BaseModelSqlv2] Error: Formula error: select * from (select COALESCE(SUBSTR((COALESCE(CASE 
        WHEN (CASE WHEN `nc_ry9l___Knihy`.`J_` = '…' THEN true ELSE false END ) THEN 'todo' 
        ELSE 'přečteno'
 END, '') || COALESCE(CASE 
        WHEN (select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula0` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc1` on `__nc1`.`table2_id` = `__nc_formula0`.`id` where `__nc1`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`) THEN COALESCE(' — ', '') || COALESCE(REPLACE(REPLACE(SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula2` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc3` on `__nc3`.`table2_id` = `__nc_formula2`.`id` where `__nc3`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),1,LENGTH((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula4` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc5` on `__nc5`.`table2_id` = `__nc_formula4`.`id` where `__nc5`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`)) - 2 ),'2018','2018-'),', ,',', '),'')  
        ELSE ''
 END,'') ),1,1), '') || COALESCE(COALESCE(CASE 
        WHEN (SUBSTR(SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula6` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc7` on `__nc7`.`table2_id` = `__nc_formula6`.`id` where `__nc7`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),-(6)),1,4) - SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula8` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc9` on `__nc9`.`table2_id` = `__nc_formula8`.`id` where `__nc9`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),1,4) ) IS NOT NULL AND (SUBSTR(SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula6` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc7` on `__nc7`.`table2_id` = `__nc_formula6`.`id` where `__nc7`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),-(6)),1,4) - SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula8` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc9` on `__nc9`.`table2_id` = `__nc_formula8`.`id` where `__nc9`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),1,4) ) != 0 THEN CASE 
        WHEN (SUBSTR(SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula10` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc11` on `__nc11`.`table2_id` = `__nc_formula10`.`id` where `__nc11`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),-(6)),1,4) - SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula12` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc13` on `__nc13`.`table2_id` = `__nc_formula12`.`id` where `__nc13`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),1,4) ) < 0  THEN '' 
        ELSE SUBSTR((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula14` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc15` on `__nc15`.`table2_id` = `__nc_formula14`.`id` where `__nc15`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),-(6))
 END 
        ELSE ''
 END, '') || COALESCE((select GROUP_CONCAT((COALESCE(SUBSTR((`__nc_formula0`.`Kdy`),0,5), '') || COALESCE(', ','') ) , ',') from `nc_ry9l___Přečteno` as `__nc_formula16` inner join `nc_ry9l___nc_m2m_vvx0qpowkb` as `__nc17` on `__nc17`.`table2_id` = `__nc_formula16`.`id` where `__nc17`.`table1_id` = `nc_ry9l___Knihy`.`ncRecordId`),'') ,'')  as `__dry_run_alias` from `nc_ry9l___Knihy`) __nc_alias - SQLITE_ERROR: no such column: __nc_formula0.Kdy
Error: Please check server log for more details
    at NcError.internalServerError (/usr/src/app/docker/main.js:1539:45034)
    at /usr/src/app/docker/main.js:1745:61508
    at async Promise.all (index 1)
    at async DatasService.getDataList (/usr/src/app/docker/main.js:1745:61086)
    at async DatasService.dataList (/usr/src/app/docker/main.js:1745:58338)
    at async DataAliasController.dataList (/usr/src/app/docker/main.js:184:58125)
@fendy3002
Copy link
Collaborator

Steps to reproduce:

  • create table1
  • add formula1 column, with CONCAT({Title}, 'A') as formula
  • create table 2
  • add ltar has many to table1
  • add lookup column, link to formula1, name it lookup2
  • add formula2 column, with CONCAT({lookup2}, 'A', {lookup2}) as formula

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0