Re: [SQL] Between and miliseconds (timestamps)

2006-11-12 Thread Ezequias Rodrigues da Rocha
Great Joe. That is what I want.Now I can do a simple select (with between) statement.Now my query that works is:select * from base.tb1 where date(tm) between '2006-09-05' and '2006-09-06' order by 1Thank you very much Joe2006/11/10, Joe <[EMAIL PROTECTED] >:Hi Ezequias,On Fri, 2006-11-10 at 16:34 -

Re: [SQL] Between and miliseconds (timestamps)

2006-11-10 Thread Joe
Hi Ezequias, On Fri, 2006-11-10 at 16:34 -0200, Ezequias Rodrigues da Rocha wrote: > Ok thank you very much, but the suggestion (SQL:when field = > '2006-09-06'::date) does not retrieve any row. It does not retrive any > error too, but the suggestion does not applied to my requisition. I think y

Re: [SQL] Between and miliseconds (timestamps)

2006-11-10 Thread Ezequias Rodrigues da Rocha
Ok thank you very much, but the suggestion (SQL:when field = '2006-09-06'::date) does not retrieve any row. It does not retrive any error too, but the suggestion does not applied to my requisition. The second suggestion is quite correct but I would like to use the between _expression_.Best regards

Re: [SQL] Between and miliseconds (timestamps)

2006-11-10 Thread A. Kretschmer
am Fri, dem 10.11.2006, um 12:50:38 -0200 mailte Ezequias Rodrigues da Rocha folgendes: > > select * from base.table > > where when > > between > > '2006-09-06 00:00: 00.00' > > and > > '2006-09-06 23:59:59.99' > > order by 2 > > > > Is there a simplest

Re: [SQL] Between and miliseconds (timestamps)

2006-11-10 Thread A. Kretschmer
am Fri, dem 10.11.2006, um 12:28:53 -0200 mailte Ezequias Rodrigues da Rocha folgendes: > Hi list, > > I noticed that when we use the keyword between in SQL statements we must > considerer all the miliseconds with 6 digits. > > I would like to know if we want to make a day selection we must use

[SQL] Between and miliseconds (timestamps)

2006-11-10 Thread Ezequias Rodrigues da Rocha
Hi list,I noticed that when we use the keyword between in SQL statements we must considerer all the miliseconds with 6 digits.I would like to know if we want to make a day selection we must use allways the max of possibilities like: select * from base.tablewhere whenbetween '2006-09-06 00:00:00.000

Re: [SQL] BETWEEN bug?

2002-07-10 Thread Josh Berkus
Stephan, > Thanks. Thought it was something like that. > > Thank you guys, though, OVERLAPS is asymmetric. Err ... I meant "symmetric". -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 6: Have you searche

Re: [SQL] BETWEEN bug?

2002-07-10 Thread Josh Berkus
Stephan, > Spec thing. > > In SQL92, > "X BETWEEN Y AND Z" is equivalent to "X>=Y AND X<=Z". > > In SQL99, there's BETWEEN SYMMETRIC and ASYMMETRIC, but ASYMMETRIC is the > default which is the same as the SQL92 version afaics. Symmetric is an > optional feature that I think Christopher's been

Re: [SQL] BETWEEN bug?

2002-07-10 Thread Stephan Szabo
On Wed, 10 Jul 2002, Josh Berkus wrote: > Folks, > > Why does BETWEEN only work for ascending criteria? For example: > > jwnet=> select '2002-06-07'::TIMESTAMP BETWEEN '2002-06-29'::TIMESTAMP and > '2002-06-01'::TIMESTAMP; > ?column? > -- > f > (1 row) > > jwnet=> select '2002-06-07':

[SQL] BETWEEN bug?

2002-07-10 Thread Josh Berkus
Folks, Why does BETWEEN only work for ascending criteria? For example: jwnet=> select '2002-06-07'::TIMESTAMP BETWEEN '2002-06-29'::TIMESTAMP and '2002-06-01'::TIMESTAMP; ?column? -- f (1 row) jwnet=> select '2002-06-07'::TIMESTAMP BETWEEN '2002-06-01'::TIMESTAMP and '2002-06-29'::

Re: [SQL] BETWEEN

2000-06-20 Thread Tom Lane
Joseph Shraibman <[EMAIL PROTECTED]> writes: > Why is BETWEEN inclusive? Because the SQL92 spec says so: 6) "X BETWEEN Y AND Z" is equivalent to "X>=Y AND X<=Z". > I had assumed that it was like the english > between, which is exclusive. That's debatable... re

[SQL] BETWEEN

2000-06-20 Thread Joseph Shraibman
Why is BETWEEN inclusive? I had assumed that it was like the english between, which is exclusive. playpen=# create table numbs ( a int); CREATE playpen=# insert into numbs values(1); INSERT 35913 1 playpen=# insert into numbs values(2); INSERT 35914 1 playpen=# insert into numbs values(3); INSE