locked
syntax eror near "" RRS feed

  • Question

  • I have SQL tables column name "Datumpåmin" type date "yyyy.MM.dd." 
    I want to remove all items if the day now has paserat date in Datumpåmin 
     SQL = "DELETE * FROM ma WHERE Datumpåmin < cast(getdate() as date)"
    I got the error message syntax eror near "" 
    Monday, February 3, 2014 7:08 PM

Answers

  • The correct command would be:

    DELETE FROM ma WHERE Datumpåmin < cast(getdate() as date)

    • Marked as answer by Majed Abbas Monday, February 3, 2014 7:35 PM
    Monday, February 3, 2014 7:25 PM
    Answerer