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: 2007-05-24 00:04:21
Message-ID: cone.1179965061.622140.29470.5001@35st.simplicato.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Browne 2007-05-24 00:17:13 Re: Vacuum DB in Postgres Vs similar concept in other RDBMS
Previous Message SCassidy 2007-05-24 00:00:08 Re: What does this error mean?