diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index c66b1b4ab4..afa338e68e 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -667,7 +667,12 @@ const parseConditionV2 = async ( } } - if (isNumericCol(column.uidt) && typeof genVal === 'string') { + if ( + isNumericCol(column.uidt) && + typeof genVal === 'string' && + !genVal.startsWith('%') && + !genVal.endsWith('%') + ) { // convert to number genVal = +genVal; } diff --git a/packages/nocodb/src/db/sortV2.ts b/packages/nocodb/src/db/sortV2.ts index 50f880cbd3..e3706d1d23 100644 --- a/packages/nocodb/src/db/sortV2.ts +++ b/packages/nocodb/src/db/sortV2.ts @@ -69,7 +69,7 @@ export default async function sortV2( model, column, {}, - alias + alias, ) ).builder; qb.orderBy(builder, sort.direction || 'asc', nulls);