| От | Rich Shepard |
|---|---|
| Тема | Re: Check for duplicates before inserting new rows |
| Дата | |
| Msg-id | alpine.LNX.2.20.2009040736090.7473@salmo.appl-ecosys.com обсуждение |
| Ответ на | Re: Check for duplicates before inserting new rows (George Woodring <george.woodring@iglass.net>) |
| Список | pgsql-general |
On Fri, 4 Sep 2020, George Woodring wrote: > I would suggest creating a temp table based on the original table and > loading the data into it first. You can then purge the duplicates. George, I hadn't thought of this. Using a duplicate table without a PK would work well if there's only one attribute that needs checking. In my case there are two tables involved: locations and measurements. So, I can create a temporary table from the new data which holds only the locations. I can then isolate the new location rows that do not already exist in that table, then insert the new data to eliminate the duplicated measurements. Thanks, Rich
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера