Hello, I want to do something like this:
UPDATE news SET sequence = sequence-1 WHERE sequence > 5 With the database-api I tried the following: News.objects.filter(sequence__gt = msequence).update(sequence = sequence-1) But thats not possible, beacause the assignment parameter sequence-1 must be a variable and not a reference to a column-value. Is there any possibility to solve this problem without iterating over all results with News.objects.filter(sequence__gt = msequence) and setting the new sequence manually in each iteration? Thanks, Toni --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---