I get this error when I try to execute a simple SQL statement that properly works on the db.
The table:
hd_date | hd_name
2025-04-21 | Ostermontag
2025-06-09 | Pfingstmontag
This works:
var sql = 'select hd_name from holidays '
cy.sqlServer(sql).then(function (result) {
cy.log(result)
})
But as soon I include the hd_date I get the error. This
var sql = 'select hd_date, hd_name from holidays '
and this
var sql = 'select hd_name from holidays where year(hd_date) = 2025'
doesn't work.
Any ideas?
1条答案
按热度按时间p8ekf7hl1#
I found the solution. Tedious loggin to the SQL server with its own default language / time settings: us_english and mdy. You need to change it in the options. In my case with cypress in the file cypress.config.js