Re: Is this stuff really SQL 92 compliant

From: Bill Wood <wood_at_dess0.light.ge.com>
Date: 23 Aug 1994 20:28:58 GMT
Message-ID: <33dm6a$ddd_at_alva.ge.com>


In article <32v6m1$hum_at_cs3.brookes.ac.uk>, p0070621_at_brookes.ac.uk (wareing pti) writes:
|> Bill Wood (wood_at_dess0.light.ge.com) wrote:
|> > In article <CuEL92.E23_at_genasys.com.au>, michaelh_at_genasys.com.au
|> >(Michael Haldey) writes:
|> > |> According to the Oracle SQL manual,
|> > |> between x and y
|> > |> means
|> > |> x <= value <= y
 

|> > This unexpected definition of 'between' is the one defined by the SQL
|> > standard. It doesn't match my understanding of the english word
|> > between, but hey, this is SQL not English.
|>
|> So you define 'a number between 1 and 10' to be 2,3,4,5,6,7,8 or 9?
|> And 'between Monday and Friday' to be Tuesday, Wednesday or Thursday?
|>
|> SQL's use of 'between' means 'between (inclusive)'. The English word
|> 'between' can mean 'between (inclusive)' or 'between (exclusive)'
|> depending on context.

But the issue here is not the inclusiveness vs exclusiveness of the between clause. The issue is that the clause is order dependent, instead of independent. While we don't often say 'a number between 10 and 1', instead of 'a number between 1 and 10', I expect the same results from both. Clearly saying 'my height is between the shortest and tallest person' is equivalent to saying 'my height is between the tallest and shortest person'.

Too many vendors considered implementing 'between x and y' as:

	x <= value <= y or
	y <= value <= x

too difficult.

Bill Wood
GE Lighting

My opinions are solely my own. Received on Tue Aug 23 1994 - 22:28:58 CEST

Original text of this message