[rt-users] Query Help Please
Mathew Snyder
theillien at yahoo.com
Sun Apr 8 03:55:13 EDT 2007
Haha! Good question. Lemme consult the string theorists and get back to you ;)
Actually, I fixed it by using OR (LastUpdated = '2007-04-01' OR LastUpdated =
'2007-04-07')
Mathew
Ruslan Zakirov wrote:
> Mathew, how it's possible that the same date field equal to
> '2007-04-01' and '2007-04-07' at the same time?
>
> On 4/8/07, Mathew Snyder <theillien at yahoo.com> wrote:
>> How do I do a query that searches for a range up to and including a date?
>>
>> I have this:
>> Queue = 'CustomerCare' AND ( ( LastUpdated < '2007-04-07' AND
>> LastUpdated >
>> '2007-04-01' ) OR ( LastUpdated = '2007-04-01' AND LastUpdated =
>> '2007-04-07' ) )
>>
>> But it's returning 0 results. If I change the 'OR' to an 'AND' it
>> still returns
>> 0. Using '>=' and '<=' doesn't work either.
>>
>> Mathew
>>
>> Mathew Snyder wrote:
>> > My query:
>> >
>> > 'Queue = "CustomerCare" AND ((Status = "open" AND LastUpdate >
>> $startDate) OR
>> > (Status = "resolved" AND Resolved > $startDate))'
>> >
>> > This, unfortunately, returns all resolved tickets (I'm not sure what
>> it returns
>> > for open tickets). How can I modify this to only return tickets
>> that are open
>> > and updated according to the date held in $startDate and/or are
>> resolved and
>> > have been resolved according to the date held in $startDate?
>> >
>> > For the record, the date is one week prior to the day the script is
>> run.
>> >
>> > Mathew
>> > _______________________________________________
>> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>> >
>> > Community help: http://wiki.bestpractical.com
>> > Commercial support: sales at bestpractical.com
>> >
>> >
>> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> > Buy a copy at http://rtbook.bestpractical.com
>> >
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
>
More information about the rt-users
mailing list