I have a SQL statement ending with the following:
…
ORDER BY dbo.AspNetUsers.{{ !!table1.sortedColumn ? table1.sortedColumn : 'AddedWhen' }} {{ table1.sortedDesc ? 'DESC' : 'ASC' }}
OFFSET {{ table1.paginationOffset }} ROWS
FETCH NEXT {{ table1.pageSize }} ROWS ONLY
The issue I have is both the results for sortedColumn and sortedDesc are wrapped in quotes, which MSSQL doesn't like.
Does anyone know how I can utilise these values in a way that is compatible?