Re: How to do select from table where something in ('What','When','Where')
Hi,
How about not in?
Select * from tableA where columnA not in
('Value1','Value2','Value3')
On Jun 24, 1:23 pm, Peter Herndon <tphern...@gmail.com> wrote:
> tableA.objects.filter(columnA__in=['Value1', 'Value2', 'Value3'])
>
> http://docs.djangoproject.com/en/1.2/ref/models/querysets/#in
>
> On Jun 24, 2010, at 4:18 PM, thusjanthan wrote:
>
>
>
> > Hi,
>
> > Can someone provide the syntax for doing the following in django
> > queries:
>
> > Select * from tableA where columnA in ('Value1','Value2','Value3')
>
> > Cheers,
> > nathan.
>
> > --
> > 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 django-users+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home