[SQL] TIME ZONE SQL

2004-02-04 Thread Raman
Hi Pls see this Query I have following fields in my table "customer_events" a) time_difference (which has values like -05:00 , +05:30, +00:00 etc) b) start_time (has value like 11:05, 10:00 etc) c) send_before_time (has value like 00:05, 00:10 etc) select ((CURRENT_TIME(0) AT TIME ZONE "interva

Re: [SQL] TIME ZONE SQL

2004-02-04 Thread Richard Huxton
On Wednesday 04 February 2004 17:57, Raman wrote: > > This query runs fine when i have > time_difference value like +5:30 +5:00 i.e. works fine for positive values > but failes for negative values i.e. -7:00, -6:00 etc > > I don't know WHY WHY... pls help > I am helpless. Can you give example outp

Re: [SQL] TIME ZONE SQL

2004-02-05 Thread Raman
an Garg -- Raman - Original Message - From: "Richard Huxton" <[EMAIL PROTECTED]> To: "Raman" <[EMAIL PROTECTED]>; "pgsql-sql" <[EMAIL PROTECTED]> Sent: Thursday, February 05, 2004 1:33 AM Subject: Re: [SQL] TIME ZONE SQL > On Wed

Re: [SQL] TIME ZONE SQL

2004-02-05 Thread Richard Huxton
On Thursday 05 February 2004 08:28, Raman wrote: > Hi Richard, > Follwing are the Results that I get > WHEN I run "between" query like > > ((CURRENT_TIME(0) AT TIME ZONE "interval" (time_difference)) BETWEEN > (start_time::time - send_before_time::time) > and start_time::time) I think the issue i

Re: [SQL] TIME ZONE SQL

2004-02-05 Thread Raman Garg
one(-7:00) Well, it worked for me now.. maybe some logic of neagative time zone is there due to which our time calculation make the difference of two time greater. :-? Thanks for your descriptive and nice explanation... Regards, -- Raman - Original Message - From: "Richard Huxton" &l

Re: [SQL] TIME ZONE SQL

2004-02-05 Thread Richard Huxton
On Thursday 05 February 2004 14:59, Raman Garg wrote: > Hi Richard, > > What I am having is > > CREATE TABLE "customer_events" ( > "event_id" numeric (10) NOT NULL, > "customer_id" numeric (10) NOT NULL, > "event_name" varchar (100) , > "event_datetime" date , > "start_time" time , > "repeat_untill

Re: [SQL] TIME ZONE SQL

2004-02-05 Thread Tom Lane
"Raman Garg" <[EMAIL PROTECTED]> writes: > Actually my "between" is creating some problems and is not giving me results > so what I have done is . IN MY WHERE CLAUSE OF QUERY: I suspect that this revised clause will give you problems too, namely selecting rows you don't want. I think what may act