would I have to do something like this?

sess = create_session()
allusers = sess.query(User).select()


for user in allusers:
    user.group = "contractor"
    print x.name


On Jun 26, 10:40 pm, voltron <[EMAIL PROTECTED]> wrote:
> Could someone tell me how I would execute this SQL using data mapping?
>
> # SQL
>
> UPDATE users SET group=consultant WHERE group = contractor;
>
> #  Mapped object
> user_mapper = mapper(User, users)
> user = User()
>
> Thanks


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to