Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Delete with subquery deleting all records


  • From: Francisco Reyes <lists(at)stringsutils(dot)com>
  • To: Joris Dobbelsteen <Joris(at)familiedobbelsteen(dot)nl>
  • Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: Delete with subquery deleting all records
  • Date: Wed, 23 May 2007 20:04:21 -0400
  • Message-id: <cone(dot)1179965061(dot)622140(dot)29470(dot)5001(at)35st(dot)simplicato(dot)com>

Joris Dobbelsteen writes:

Hint: LEFT JOIN is your mistake...

The use of left join in general.. or my left join?
When I do the left join by itself I verified manually and it had the data I wanted.
Thought: are you sure you are going to delete those rows? In there cases
human verification is usually the way to go, though it takes a lot of
time.

If I can't not find a way to do this through SQL I will write a program.
The time to try and clean this by hand would be countless hours. There are a lot of records in the child table that do not have a matching record in the parent table.




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group