Campbell Ritchie wrote:Don't know. What happens when you run that query from the command line/terminal? Moving to our databases and Spring fora.
Gerard Geded wrote:I tried like this : "SELECT * FROM informations WHERE lastTreatment < DATEADD(MINUTE, -30, GETDATE())"
Ron McLeod wrote: Gerard Geded wrote:I tried like this : "SELECT * FROM informations WHERE lastTreatment < DATEADD(MINUTE, -30, GETDATE())" Can you show the actual code where this is used?
Ron McLeod wrote:
Ron McLeod wrote:The concatenated string will be:"SELECT * FROM informationWHERE AND lastTreatment < NOW() - INTERVAL 30 MINUTE "with no space between information and WHERE
Ron McLeod wrote:This:"SELECT * FROM information" + "WHERE AND lastTreatment < NOW() - INTERVAL 30 MINUTE " and this: are obviously not the same. One has a table name of information, the other has UsersAccount.