Delete from right join

From: "Chad Thompson" <chad(at)weblinkservices(dot)com>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Delete from right join
Date: 2003-01-07 20:08:29
Message-ID: 00da01c2b688$8c5a2280$32021aac@chad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have the following query

select project_lists.*
FROM temp_lol RIGHT JOIN project_lists ON temp_lol.project_id = project_lists.project_id
WHERE temp_lol.project_id Is Null

I run this on my postgresql 7.2.x database and it returns some 3k records.

If i use a join or a left join it returns no data.

If I do this however
DELETE
FROM temp_lol RIGHT JOIN project_lists ON temp_lol.project_id = project_lists.project_id
WHERE temp_lol.project_id Is Null

I get an error, Parse error at or near right.

I realize that right joins are evil, but I dont know what else to use to delete these 3k records from my table.

Any Ideas?

Thanks
Chad

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2003-01-07 20:55:47 Re: Delete from right join
Previous Message Adam Witney 2003-01-07 11:03:15 Re: SQL list table names