Hi Eric,

no, it's not a one-off job but the cursor object looks easy enough. Do you know what connection that is, i.e. is it the same one django will use for the rest of my queries (I'm implementing a server that's supposed to run 24/7) or do I have to shut it down.

Thanks,

chris

On 5/23/06, Eric Walstad <[EMAIL PROTECTED]> wrote:

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