[sqlalchemy] Re: SQL mass-delete

2008-05-13 Thread Michael Bayer
On May 13, 2008, at 9:08 AM, jean-philippe dutreve wrote: I'd like to delete all Transactions contained in an account hierarchy without loading any transaction into memory, just DB work with the SQL DELETE request constructed by SA. The query that defines the transactions is:

[sqlalchemy] Re: SQL mass-delete

2008-05-13 Thread Michael Bayer
On May 13, 2008, at 11:03 AM, jean-philippe dutreve wrote: I've this error: ProgrammingError: (ProgrammingError) subquery in FROM must have an alias HINT: For example, FROM (SELECT ...) [AS] foo. 'DELETE FROM winancial_integ.acc_transactions WHERE EXISTS (SELECT 1 \nFROM (SELECT

[sqlalchemy] Re: SQL mass-delete

2008-05-13 Thread Michael Bayer
On May 13, 2008, at 11:28 AM, jean-philippe dutreve wrote: Ok thanks. Transaction_id is defined twice, one from transaction table another from entries: yeah can you just use a select() for this, for now ? Query in 0.4 really wasnt designed to be resused as a subquery.

[sqlalchemy] Re: SQL mass-delete

2008-05-13 Thread jean-philippe dutreve
fine. thank you for your help. jean-philippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send