X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 13328D1C93C for ; Wed, 21 Apr 2004 05:57:54 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 62960-03 for ; Wed, 21 Apr 2004 05:57:54 -0300 (ADT) Received: from cyber12.e-insites.com (ns10.nic-reg-dns.com [66.206.10.2]) by svr1.postgresql.org (Postfix) with ESMTP id 01111D1C4E0 for ; Wed, 21 Apr 2004 05:57:52 -0300 (ADT) Received: from server2k ([61.11.69.26]) by cyber12.e-insites.com with MailEnable ESMTP; Wed, 21 Apr 2004 01:57:52 -0700 Received: from 192.168.50.51 by server2k ([192.168.50.102] running VPOP3) with SMTP; Wed, 21 Apr 2004 14:36:17 +0530 X-MSReally-From: denis@coralindia.com Message-ID: <007101c4277e$18a5d420$3332a8c0@DENIS> From: denis@coralindia.com To: "P A" , Cc: References: <20040419203150.77559.qmail@web41112.mail.yahoo.com> Subject: Re: Can someone tell me why this statement is failing? Date: Wed, 21 Apr 2004 14:23:17 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Server: VPOP3 V1.5.0 - Registered X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.4 tagged_above=0.0 required=5.0 tests=MAILTO_TO_SPAM_ADDR, NO_REAL_NAME, RCVD_IN_SORBS X-Spam-Level: * X-Archive-Number: 200404/284 X-Sequence-Number: 17659 Hi.. Your END_TIME_MINUTES condition fails.. 1082377320 <= 1082375100 HTH. Denis ----- Original Message ----- From: P A To: Cc: Sent: Tuesday, April 20, 2004 2:01 AM Subject: [SQL] Can someone tell me why this statement is failing? > Can anyone tell me why this SQL statement is not > matching with the row from the table below? I think > I'm going mad! > > ##################################### > SQL Statement > ##################################### > > SELECT * FROM t_bell_schedule WHERE calendar_day = > '2004-04-12' AND start_time_minutes >= '1082374200' > AND end_time_minutes <= '1082375100'; > > ##################################### > Current DB Data to match > ##################################### > > calendar_day | period_letter | start_time_minutes | > end_time_minutes > --------------+---------------+--------------------+------------------ > 2004-04-12 | B | 1082374440 | > 1082377320 > > ##################################### > DB Structure > ##################################### > > Column | Type | > Modifiers > --------------------+-----------------------------+----------------------- --------------------------------------------------------- > bell_schedule_uid | integer | > not null default > nextval('public.t_bell_schedule_bell_schedule_uid_seq'::text) > calendar_day | date | > period_letter | character varying(4) | > period | character varying(4) | > start_time | time without time zone | > end_time | time without time zone | > total_minutes | integer | > activestatus | integer | > datecreated | timestamp without time zone | > datemodified | timestamp without time zone | > start_time_minutes | integer | > end_time_minutes | integer | > > > Cheers, > Pete > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Photos: High-quality 4x6 digital prints for 25¢ > http://photos.yahoo.com/ph/print_splash > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster