pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Walt Bigelow <walt@stimpy.com>
To: pgsql-sql@postgresql.org
Subject: returning the current date in a SQL query
Date: Wed, 12 Aug 1998 11:31:38 -0700 (PDT)
Message-ID: <Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com> (raw)

I have a table (tblprojects) that stores the current projects in our
facility.  I want to be able to have two of the records "[unknown]" and
"pending"  (the project titles) always return the current date- basically
overwriting the date field stored in the table.

I need this because I am sorting the projects in a 'combo box' (in MS
Access) by dates, for example today, this week, last week, this month,
last month, etc.  But I want the "[unknown]" and "pending" projects to
ALWAYS appear in the result of the query.

Is this possible?  Do I have to set the date field of the table to
something like a function?

Thanks in advance for any help!

Walt

P.S. my date field is of type "datetime"





view thread (5+ messages)  latest in thread

Message-ID: <Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com>
Permalink:  ../Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com/
Also on:    postgresql.org/message-id/Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: walt@stimpy.com
  Subject: Re: returning the current date in a SQL query
  In-Reply-To: <Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com>
  References: <Pine.LNX.3.96.980812112247.18245A-100000@alice.stimpy.com>

* 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