Search Postgresql Archives

deleting records is failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This question is probably real easy to answer, but I've got myself into a
vicious loop and can't see the forest through the trees.

I have a set of records spanning several dates, and I want to delete some
records within a specific date range.  For example, I have a record for each
day from Sept 1 through Nov 1, and I want to delete the records for Sept 21
through 10/20 and leave all the rest.

Here is my query that's deleting all the records for the episode
DELETE FROM tracker WHERE tracker.episode_id = 238 AND 
( rug_tracker.date_of_service < '09/12/2005' 
OR rug_tracker.date_of_service > '10/20/2005' );

I would really appreciate someone showing me the way through the forest.

Thank you,

Tim




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux