November 20, 2008 at 1:39 pm
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')
November 20, 2008 at 2:11 pm
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
November 20, 2008 at 2:19 pm
It is a datetime field.
November 20, 2008 at 2:21 pm
Then try
DELETE from License_Table
where license_date between '2008-11-15' and '2008-11-16'
DAB
November 20, 2008 at 2:49 pm
That worked! Thanks
November 20, 2008 at 2:52 pm
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