On Tuesday 23 May 2006 12:17, Christian Schneider wrote:
> Hi all,
>
> is it possible to update tables in bulk, that is in SQL "update jobs set
> status=2 where worker='X'"? I'm using django from a backend server process
> and speed is a bit of an issue here, so I'd like to avoid changing and
> saving every object individually.
>
> chris

Hi Chris,

If it's a one-off task, I'd just do it at your DB's command line.  Otherwise, 
have a look at the docs for executing arbitrary sql statements using Django's 
cursor object.  I don't know of a Django orm method that does exactly what 
you want.

<http://www.djangoproject.com/documentation/model_api/#executing-custom-sql>

Best regards,

Eric.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to