X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CAE6A3A3D3D for ; Tue, 2 Nov 2004 15:44:44 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88519-07 for ; Tue, 2 Nov 2004 15:44:39 +0000 (GMT) Received: from mta.algx.net (mta5.algx.net [67.92.168.234]) by svr1.postgresql.org (Postfix) with ESMTP id 17A1B3A3F15 for ; Tue, 2 Nov 2004 15:44:41 +0000 (GMT) Received: from John (ip216-203-212-194.z212-203-216.customer.algx.net [216.203.212.194]) by chimmx04.algx.net (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0I6K008ER6EI0H@chimmx04.algx.net> for pgsql-sql@postgresql.org; Tue, 02 Nov 2004 09:44:42 -0600 (CST) Date: Tue, 02 Nov 2004 10:44:41 -0500 From: "John B. Scalia" Subject: query using a date field that isn't set To: pgsql-sql@postgresql.org Message-id: <0I6K008ES6EI0H@chimmx04.algx.net> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Content-type: multipart/alternative; boundary="Boundary_(ID_YicB2q/LKE21tOW909V8ug)" Thread-index: AcTA8t42xVVO4pWfReqpbwAu4mjm8A== X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_60_70, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200411/57 X-Sequence-Number: 19376 This is a multi-part message in MIME format. --Boundary_(ID_YicB2q/LKE21tOW909V8ug) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Hi all, I've got a SQL problem that's stumping me. I have an employee table with a field labeled: Emp_terminated DATE Obviously, some employees in this table won't have this field set. I want a query to select only employees without this field being set, ie., only current employees. I've got the inverse working by using: SELECT * FROM employee WHERE ISFINITE(emp_terminated); And that gives me all the old employees (where the field has a value), but for the life of me, I can't figure out the syntax to use for employees that haven't been terminated or quit. Everything I've tried returns no rows. Anybody? -- John --Boundary_(ID_YicB2q/LKE21tOW909V8ug) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7BIT

Hi all,

 

I’ve got a SQL problem that’s stumping me. I have an employee table with a field labeled:

 

Emp_terminated            DATE

 

Obviously, some employees in this table won’t have this field set. I want a query to select only employees without this field being set, ie., only current employees. I’ve got the inverse working by using:

 

SELECT * FROM employee WHERE ISFINITE(emp_terminated);

 

And that gives me all the old employees (where the field has a value), but for the life of me, I can’t figure out the syntax to use for employees that haven’t been terminated or quit. Everything I’ve tried returns no rows.

 

Anybody?

--

John

--Boundary_(ID_YicB2q/LKE21tOW909V8ug)--