Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 10 total |
BETWEEN |
Thu, Jun 4 2009 9:46 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | May be WAD may be bug. I suddenly thought is BETWEEN between or between and including (amazing what goes through your mind isn't it) so I ran a test.
I also thought I'd test something else out. This select _ID from contacts where _ID between 10 and 100001 produces a 1 row result whereas this select _ID from contacts where _ID between 100001 and 10 returns a null row. The manual doesn't say the parameters have to be in ascending order, and whilst it may be required I don't understand why that would be so. Roy Lambert |
Thu, Jun 4 2009 10:37 AM | Permanent Link |
Fernando Dias Team Elevate | Roy,
It's the standard definition for the "between" predicate. Here is an excerpt of the relevant part in the SQL2003 standard docs: ----------------------------------------------------------------------- 1) If neither SYMMETRIC nor ASYMMETRIC is specified, then ASYMMETRIC is implicit. (...) 6) “X BETWEEN ASYMMETRIC Y AND Z” is equivalent to “X>=Y AND X<=Z”. ----------------------------------------------------------------------- -- Fernando Dias [Team Elevate] |
Thu, Jun 4 2009 11:05 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fernando
OK so what's X BETWEEN SYMMETRIC Y AND Z Roy Lambert |
Thu, Jun 4 2009 12:38 PM | Permanent Link |
Fernando Dias Team Elevate | Roy,
X BETWEEN SYMMETRIC Y AND Z is equivalent to (X>=Y AND X<=Z) OR (X>=Z AND X<=Y). IOW, it's a short way to say: X BETWEEN Y AND Z OR X BETWEEN Z AND Y But AFAIK it's not implemented in EDB. -- Fernando Dias [Team Elevate] |
Thu, Jun 4 2009 1:12 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fernando
So SYMMETRIC sounds as though it means what almost any human being would translate BETWEEN to mean. Yet again I am astounded by the imbecility of the standard setters. Roy Lambert |
Thu, Jun 4 2009 1:40 PM | Permanent Link |
Fernando Dias Team Elevate | Roy,
> So SYMMETRIC sounds as though it means what almost any human being would translate BETWEEN to mean. Yet again I am astounded by the imbecility of the standard setters. Ok, but don't kill the messenger, please -- Fernando Dias [Team Elevate] |
Thu, Jun 4 2009 1:50 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fernando
>Ok, but don't kill the messenger, please Don't worry. I prefer to keep them alive so I can keep on torturing them. Roy Lambert |
Fri, Jun 5 2009 12:06 PM | Permanent Link |
"John Hay" | Roy
So SYMMETRIC sounds as though it means what almost any human being would translate BETWEEN to mean. Yet again I am astounded by the imbecility of the standard setters. So "the days between Monday and Thursday" is the same as "the days between Thursday and Monday" ? <bg> John |
Sat, Jun 6 2009 3:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
> So SYMMETRIC sounds as though it means what almost any human being would >translate BETWEEN to mean. Yet again I am astounded by the imbecility of the >standard setters. > >So "the days between Monday and Thursday" is the same as "the days between >Thursday and Monday" ? <bg> Yes and No The days between Monday 1st and Thursday 4th are the same as the days between Thursday 4th and Monday 1st but not the same as the days between Thursday 4th and Monday 8th. I brilliant example of partial definition of the parameters. Roy Lambert |
Mon, Jun 8 2009 5:52 AM | Permanent Link |
"John Hay" | Roy
> Yes and No > > The days between Monday 1st and Thursday 4th are the same as the days between Thursday 4th and Monday 1st but not the same as the days between Thursday 4th and Monday 8th. > > I brilliant example of partial definition of the parameters. With you on their case the standard setters are between a rock and a hard place or was that between..... John |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |