pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John B. Scalia <jscalia@cityblueprinting.com>
To: pgsql-sql@postgresql.org
Subject: query using a date field that isn't set
Date: Tue, 02 Nov 2004 10:44:41 -0500
Message-ID: <0I6K008ES6EI0H@chimmx04.algx.net> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <0I6K008ES6EI0H@chimmx04.algx.net>
Permalink:  ../0I6K008ES6EI0H@chimmx04.algx.net/
Also on:    postgresql.org/message-id/0I6K008ES6EI0H@chimmx04.algx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jscalia@cityblueprinting.com
  Subject: Re: query using a date field that isn't set
  In-Reply-To: <0I6K008ES6EI0H@chimmx04.algx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox