Greater - Less than or equal to

Hi:

I am trying to build a query using greater than / less than equal to as you see below:

  [Posting Month Year] greater than or equal to 9/2007

And
[Posting Month Year] less than or equal to 9/2008

The result that I got is 9/2007 and 9/2008

Does anybody know why I cant get the correct result ?

Thanks
:nonod: :nonod:


Mr. XI (BOB member since 2008-09-25)

Mr. XI,

Welcome to B :mrgreen: B ! ! !

The truthful answer is we don’t know your data, so we can’t comment on why you got what you’re seeing. Only you know your data well enough in order to determine validity. After reading your posting a question in mind is why you are not using the “between” operator. Keep in mind that between is conclusive, so if you say [Posting Month Year] between 2007/9 and 2008/9 then all records that have a September 2007 thru September 2008 date will be included. If you need more help with this concept please post the application you are using (Designer, WebI, etc) and workflow you are applying to get your results.

Thanks,
John


jsanzone :us: (BOB member since 2006-09-12)

I am using WebI XI R1/R2


Mr. XI (BOB member since 2008-09-25)

If the data is stored as 9/2007 as a character string, then you’re doing character comparison. That’s different from dates.

For example, in character comparison month 10 (October) comes after month 1 (January) as:

1/2009
10/2009
11/2009
12/2009
2/2009

And so on from there.


Dave Rathbun :us: (BOB member since 2002-06-06)