Hello,
I am getting no results in sql query because the filter in where clause was changed by sequelize/tedious before query is executed.
const query = `SELECT field FROM Table WITH(NOLOCK) WHERE CreationDate BETWEEN '${startDate}' AND '${endDate}'`
return sequelize.rawQuery(query)
.then((resultado) => {
return resultado;
})
.catch((error) => {
console.log('error')
});
This is the query generated by sequelize/tedious
SELECT [Field]
FROM [Table] AS [Table]
WHERE
([Table].[CreationDate] > N'2018-02-01 16:36:00.000 -02:00'
AND [Table].[CreationDate] < N'2018-02-01 16:46:00.000 -02:00')
Can you help me how to solve this?
CreationDate is stored as YYYY-MM-DD HH:MM:SS