• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

NOT BETWEEN in EJB-QL?

 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, in case we have the following values:

A, B, C, D

the following query (excuse me the meaningless context):

SELECT OBJECT(o) from LettersSchema o
WHERE o.id NOT BETWEEN A AND D

would return A and D? In few words, I know the NOT BETWEEN is exclusive, does this mean that the first and the last values are not included in the WHERE clause?
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, found the answer myself. Specs, 11.2.7.7


p.age NOT BETWEEN 15 and 19 is equivalent to p.age < 15 OR p.age > 19

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
..and BETWEEN is equal to >= ... =<, yup?

(just to check myself) :-)
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Alexey Prohorenko:
..and BETWEEN is equal to >= ... =<, yup?

(just to check myself) :-)



Yup. BETWEEN is inclusive (it means the boundaries of the selection are included - From here...>= =< ; NOT BETWEEN is exclusive (the boundaries are not included - From here < and >
 
Just the other day, I was thinking ... about this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic