Browse Source

fix(nocodb): wrap the second argument in formula RIGHT

pull/4351/head
Wing-Kam Wong 2 years ago
parent
commit
a6685b924a
  1. 4
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts

4
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts

@ -47,9 +47,9 @@ const sqlite3 = {
},
RIGHT: (args: MapFnArgs) => {
return args.knex.raw(
`SUBSTR(${args.fn(args.pt.arguments[0])},-${args.fn(
`SUBSTR(${args.fn(args.pt.arguments[0])},-(${args.fn(
args.pt.arguments[1]
)})${args.colAlias}`
)}))${args.colAlias}`
);
},
MID: 'SUBSTR',

Loading…
Cancel
Save