Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread John McKown
On Fri, May 29, 2015 at 12:48 PM, Stephen Cook wrote: > Use UNION ALL: > > select * from table where number * 3 between start_value1 and end_value2 > UNION ALL > select * from table where number * 3 between start_value2 and end_value2 > UNION ALL > select * from table where number * 3 between

Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread Stephen Cook
Use UNION ALL: select * from table where number * 3 between start_value1 and end_value2 UNION ALL select * from table where number * 3 between start_value2 and end_value2 UNION ALL select * from table where number * 3 between start_value3 and end_value3; -- Stephen On 5/29/2015 12:32 PM, Ar

Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread John R Pierce
On 5/29/2015 10:41 AM, John R Pierce wrote: On 5/29/2015 9:32 AM, Arup Rakshit wrote: Can I do the below 3 queries in a single query ? select * from table where number * 3 between start_value1 and end_value2; select * from table where number * 3 between start_value2 and end_value2; select

Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread Raymond O'Donnell
On 29/05/2015 17:32, Arup Rakshit wrote: > Hi, > > Can I do the below 3 queries in a single query ? > > select * from table where number * 3 between start_value1 and end_value2; > select * from table where number * 3 between start_value2 and end_value2; > select * from table where number * 3

Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread Andreas Kretschmer
Arup Rakshit wrote: > Hi, > > Can I do the below 3 queries in a single query ? OR ? Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --en

Re: [GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread John R Pierce
On 5/29/2015 9:32 AM, Arup Rakshit wrote: Can I do the below 3 queries in a single query ? select * from table where number * 3 between start_value1 and end_value2; select * from table where number * 3 between start_value2 and end_value2; select * from table where number * 3 between start_va

[GENERAL] Between with a list of ranges possible ?

2015-05-29 Thread Arup Rakshit
Hi, Can I do the below 3 queries in a single query ? select * from table where number * 3 between start_value1 and end_value2; select * from table where number * 3 between start_value2 and end_value2; select * from table where number * 3 between start_value3 and end_value3; --

[GENERAL] between SIMPLE and ENGLISH FULL TEXT Configuration in Postgresql 9.0.1.?

2010-11-28 Thread AI Rumman
What is the difference between SIMPLE and ENGLISH FULL TEXT Configuration in Postgresql 9.0.1.

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread johnf
On Tuesday 30 June 2009 10:48:50 am Scott Marlowe wrote: > Oh I so do hope that we won't have to bother with currencies anymore THAT > > > far into the future! > > You laugh, but who will be fixing the Y20M problem, huh? Not you or I that's for sure. -- John Fabiani -- Sent via pgsql-general

Re: [GENERAL] BETWEEN not matching on timestamp value]

2009-06-30 Thread James B. Byrne
On Tue, June 30, 2009 14:07, Tom Lane wrote: > > > It's the eight-digit year field that it's unhappy with ... > Duuuh! I suppose that it would... Thanks, -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte & Lyne Limit

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Tom Lane
"James B. Byrne" writes: > The column is a timestamp value. I expected any time on any given > date to fall between the start and end of that day so the > hh:mm:ss:hh portion does not leap out at me as something that should > cause a problem. Should it? It's the eight-digit year field that it'

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Scott Marlowe
On Tue, Jun 30, 2009 at 11:51 AM, James B. Byrne wrote: > > On Tue, June 30, 2009 13:24, Tom Lane wrote: > >> >> No, it's complaining that the constant is out of range --- it's >> failing long before it's tried to do any actual BETWEEN comparisons. >> Surely you meant something more like 2008-08-09

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread James B. Byrne
On Tue, June 30, 2009 13:24, Tom Lane wrote: > > No, it's complaining that the constant is out of range --- it's > failing long before it's tried to do any actual BETWEEN comparisons. > Surely you meant something more like 2008-08-09? > > regards, tom lane > The column is a

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Scott Marlowe
On Tue, Jun 30, 2009 at 11:45 AM, Alban Hertroys wrote: > On Jun 30, 2009, at 7:17 PM, James B. Byrne wrote: > >> I have encountered an error that, on the face of it, seems to me to >> be inexplicable.  I hope that someone here can illuminate the matter >> for me. >> >>     PGError: ERROR:  timesta

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Alban Hertroys
On Jun 30, 2009, at 7:17 PM, James B. Byrne wrote: I have encountered an error that, on the face of it, seems to me to be inexplicable. I hope that someone here can illuminate the matter for me. PGError: ERROR: timestamp out of range: "20080809-01-01 00:00:00" : SELECT * FROM "curre

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Tom Lane
"James B. Byrne" writes: > I have encountered an error that, on the face of it, seems to me to > be inexplicable. I hope that someone here can illuminate the matter > for me. > PGError: ERROR: timestamp out of range: "20080809-01-01 > 00:00:00" > : SELECT * FROM "currency_exchange_r

[GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread James B. Byrne
I have encountered an error that, on the face of it, seems to me to be inexplicable. I hope that someone here can illuminate the matter for me. PGError: ERROR: timestamp out of range: "20080809-01-01 00:00:00" : SELECT * FROM "currency_exchange_rates" WHERE (currency_code_base = E'CA

Re: [GENERAL] Between !

2006-03-24 Thread Dann Corbit
t; [EMAIL PROTECTED] On Behalf Of Carlos Rivas > Sent: Friday, March 24, 2006 3:34 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Between ! > > Necesito saber si alguien sabe si puedo utilizar la instruccion between > en un selet en postgress ya que lo he >

[GENERAL] Between !

2006-03-24 Thread Carlos Rivas
Necesito saber si alguien sabe si puedo utilizar la instruccion between en un selet en postgress ya que lo he probado y no me devuelve nada. ejemplo: SELECT * FROM NOMBRES WHERE APELLIDO BETWEEN 'R' AND 'RO'; Gracias. ---(end of broadcast)--- T

Re: [GENERAL] between

2003-12-27 Thread Casey Allen Shobe
Mike Nolan (Friday 26 December 2003 16:02) > Sometimes books are still better than online docs. :-) No, the online docs simply need an index with links :-). If I could look at a complete index and quickly find BETWEEN in the B's with links to applicable sections, I would have no other wish of

Re: [GENERAL] between

2003-12-26 Thread Tom Lane
Martin Marques <[EMAIL PROTECTED]> writes: > I personaly find this incomplete: > ==>CUT FROM THE SELECT MANUAL<=== So it is, but I think the solution is to eliminate the incomplete examples. Which, indeed, seems to have been done in the 7.4 docs: http://www

Re: [GENERAL] between

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 20:10, Randal L. Schwartz escribió: > > "Martin" == Martin Marques <[EMAIL PROTECTED]> writes: > > Martin> A link to the URL above in the SELECT page? > > Uh, do you also want a link to "installing PostgreSQL" there too? > After all, you have to install Pg before you can us

Re: [GENERAL] between

2003-12-26 Thread Randal L. Schwartz
> "Martin" == Martin Marques <[EMAIL PROTECTED]> writes: Martin> A link to the URL above in the SELECT page? Uh, do you also want a link to "installing PostgreSQL" there too? After all, you have to install Pg before you can use the SELECT operator. It's not any more related to SELECT than it

Re: [GENERAL] between

2003-12-26 Thread Mike Nolan
> Just FYI, there's an index entry for BETWEEN in the PG docs too: > http://www.postgresql.org/docs/7.4/static/bookindex.html > although it seems to mistakenly be lowercase instead of uppercase > as one would expect. I think I tried searching on 'between' but didn't find anything. > In general th

Re: [GENERAL] between

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 18:27, Tom Lane escribió: > Mike Nolan <[EMAIL PROTECTED]> writes: > > It took me less time with the Oracle SQL Language Reference Manual, but > > I cheated by looking it up in the index. > > Just FYI, there's an index entry for BETWEEN in the PG docs too: > http://www.postgresq

Re: [GENERAL] between

2003-12-26 Thread Tom Lane
Mike Nolan <[EMAIL PROTECTED]> writes: > It took me less time with the Oracle SQL Language Reference Manual, but > I cheated by looking it up in the index. Just FYI, there's an index entry for BETWEEN in the PG docs too: http://www.postgresql.org/docs/7.4/static/bookindex.html although it seems to

Re: [GENERAL] between

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 18:02, Mike Nolan escribió: > > Damn, didn't find it in the docs, and just supposed it wasn't there. > > Try finding it in the online mysql docs. :-) > > Yes, it is there, but it took me far longer to wade through their > docs to find it than in the postgresql docs. > > It

Re: [GENERAL] between

2003-12-26 Thread Mike Nolan
> Damn, didn't find it in the docs, and just supposed it wasn't there. Try finding it in the online mysql docs. :-) Yes, it is there, but it took me far longer to wade through their docs to find it than in the postgresql docs. It took me less time with the Oracle SQL Language Reference Manua

Re: [GENERAL] between

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 16:26, escribió: > Martin Marques <[EMAIL PROTECTED]> writes: > >> That's been in PostgreSQL for a long time. > > > Damn, didn't find it in the docs, and just supposed it wasn't there. > > It's been shown on the 'Comparison Operators' page for a long time: > > http://www.postg

Re: [GENERAL] between

2003-12-26 Thread Tom Lane
Martin Marques <[EMAIL PROTECTED]> writes: >> That's been in PostgreSQL for a long time. > Damn, didn't find it in the docs, and just supposed it wasn't there. It's been shown on the 'Comparison Operators' page for a long time: http://www.postgresql.org/docs/7.1/static/functions-comparison.html

Re: [GENERAL] between

2003-12-26 Thread Martin Marques
El Vie 26 Dic 2003 13:02, Mike Nolan escribió: > > Is there any chance on supporting BETWEEN in the WHERE conditions of a SELECT > > clause? > > You mean like this? > > Welcome to psql 7.4.1, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for hel

Re: [GENERAL] Between(Interval of two dates) in Postgres

2003-09-12 Thread Pavel Stehule
Hello set DateStyle TO German ; SET testdb011=> select current_date between '31.01.2000' and '31.01.2004'; ?column? -- t regards Pavel On Fri, 12 Sep 2003, Amin Schoeib wrote: > > Hi, > can somebody tell me > How I can use the Oracle between function in Postgres? > Like this: > Sel

[GENERAL] Between(Interval of two dates) in Postgres

2003-09-12 Thread Amin Schoeib
Title: Between(Interval of two dates) in Postgres Hi, can somebody tell me How I can use the Oracle between function in Postgres? Like this: Select name from test Where date_f between '31.01.2000' And '31.01.2003' Thanxx Schoeib 4Tek Gesellschaft für angewandte Informationstechn

[GENERAL] BETWEEN clause

2001-04-23 Thread Paul Tomblin
Is the "BETWEEN" clause inclusive or exclusive? ie if I say "WHERE latitude BETWEEN 45 and 55", will I get examples where the latitude equals 45 or not? Also, is "latitude BETWEEN 45 and 55" any more efficient than "latitude >= 45 AND latitude <= 55", or is it just a stylistic thing? -- Paul T

[GENERAL] 'BETWEEN' documentation pointer?

2000-06-06 Thread Ed Loehr
Can anyone point me to any online documentation on how to use the 'BETWEEN' operator/function? (As in "SELECT * FROM foo WHERE id BETWEEN ...") Regards, Ed Loehr