| От | 'knut.suebert@web.de' |
|---|---|
| Тема | Re: delete other similar entries with timestamp <= times |
| Дата | |
| Msg-id | 20020802175950.GA22007@web.de обсуждение исходный текст |
| Ответ на | Re: delete other similar entries with timestamp <= times ("Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>) |
| Список | pgsql-novice |
Henshall, Stuart - WCP schrieb:
> Hello,
> How about something like:
> DELETE FROM tbl WHERE EXISTS
> (SELECT * FROM tbl AS tbl_b WHERE tbl_b.nr=tbl.nr
> AND tbl_b.stamp<tbl.stamp AND
> tbl_b.stamp>=tbl.stamp-CAST('15 minute' AS interval));
> This may have a problem with the following however:
> nr | stamp
> ---+------
> 1 | 20:45
> 1 | 20:55
> 1 | 21:05
> I am unsure wether this will leave just the 20:45 case or be indeterminate
> (with the alternate leaving the 20:45 and 21:05 entry)
That does not care a very lot in my case - but thanks a lot,
Knut Sübert
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера