Delete Row

  • I have a couple of rows in my test table I would like to delete based on a date. However, I can not seem to get the syntax right in order to do so. What am I doing wrong? Any help will be greatly appreciated.

    DELETE FROM LICENSE_Table

    WHERE LICENSE_DATE IN('11/15/2008')

  • bpowers (11/20/2008)


    I have a couple of rows in my test table I would like to delete based on a date. However, I can not seem to get the syntax right in order to do so. What am I doing wrong? Any help will be greatly appreciated.

    DELETE FROM LICENSE_Table

    WHERE LICENSE_DATE IN('11/15/2008')

    IF there is not time portion in the date, 11/15/2008 13:02:28.005, AND all the test data is ONLY for that date, then...

    [Code]DELETE from License_Table

    where license_date = '2008-11-15'[/Code]

    DAB

  • It is a datetime field.

  • Then try

    DELETE from License_Table

    where license_date between '2008-11-15' and '2008-11-16'

    DAB

  • That worked! Thanks

  • Glad I could help

    DAB

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply