Hmm, maybe I'm wrong and a query by date range is possible. Just saw
this 
http://stackoverflow.com/questions/1513526/app-engine-gql-querying-a-date-range

Post.gql('WHERE created_at > DATE(:1, :2, :3) AND created_at < DATE(:
1, :2, :4) and slug = :5',
    int(bit[0]), int(bit[1]), int(bit[2]), int(bit[2]) + 1, bit[3])

But it might be a bit slow. Right now I have about 80000 rows and i'll
have many more. So performance wise, is it worth setting up the
year_month field and query by that?

What do you think?

On Dec 4, 3:52 pm, sofia <[email protected]> wrote:
> I would like to do something like
>
> SELECT * FROM MyTable WHERE input_date >= start_date AND input_date <=
> end_date
>
> but I get Inequality Filters Are Allowed On One Property Only
>
> Seehttp://appengine-cookbook.appspot.com/recipe/how-to-query-by-date-range/
>
> Well, guess i'll have to do the script then
>
> On Dec 4, 3:43 pm, Eli Jones <[email protected]> wrote:
>
>
>
> > What do you mean by double filter?
>
> > What exactly is the select/query you want to run?
>
> > What does your Model look like?
>
> > From your description of the issue, it's hard to tell what you mean by
> > "double filter".
>
> > Thanks for clarification.
>
> > On Fri, Dec 4, 2009 at 9:40 AM, sofia <[email protected]> wrote:
> > > Hi,
>
> > > I have a model that I need to filter by date, start and end date. It
> > > has a DateTime property to which this double filter was going to be
> > > applied but I've since found out that this isn't possible in app
> > > engine. So now I want to add a new field with only the year and month,
> > > something like 200912 and will only filter by month.
>
> > > So if i have a 1000 rows, like this
>
> > > title          | date_created            | year_month
> > > a string    | 2009-10-12 00:00:00 |
> > > the string | 2009-09-22 00:00:00 |
>
> > > how do i update in one go all rows so that i end up with this:
>
> > > title          | date_created            | year_month
> > > a string    | 2009-10-12 00:00:00 | 200910
> > > the string | 2009-09-22 00:00:00 | 200909
>
> > > Is there any way to do this, or do I have to create a script that
> > > fetches each row one by one and updates the field accordingly?
>
> > > Thanks,
>
> > > Sofia
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > > "Google App Engine" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine%2Bunsubscrib
> > >  [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-appengine?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.


Reply via email to