View Single Post

   
  #5 (permalink)  
Old 04-18-2008, 12:22 PM
Kevin
 
Posts: n/a
Default Re: Advise about how to delete entries

Arnau wrote:

> Hi all,
>
> >
> > COPY FROM a file with all the ID's to delete, into a temporary

> table, and do a joined delete to your main table (thus, only one query).
>
>
> I already did this, but I don't have idea about how to do this join,
> could you give me a hint ;-) ?
>
> Thank you very much


maybe something like this:

DELETE FROM statistics_sasme s
LEFT JOIN temp_table t ON (s.statistic_id = t.statistic_id)
WHERE t.statistic_id IS NOT NULL


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Reply With Quote