I have an insert query in SQL where the records to be inserted are computed from a SELECT. Can I build this query in the SqlAlchemy query construction language?
INSERT INTO product_current_promotion (promotion_id, product_id) SELECT promo_promotion.id, promo_promotion_items.product_id FROM promo_promotion_items, promo_promotion WHERE promo_promotion.id = promo_promotion_items.promotion_id AND promo_promotion.week_id = 3 One thought is to build the SELECT in SqlAlchemy, loop over that in Python and insert the records that way, but I'd like to make the database do all the work. Barry ____________________________________________________________________________________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433 --~--~---------~--~----~------------~-------~--~----~ 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 email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---