pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres Date Functions
2+ messages / 2 participants
[nested] [flat]

* Postgres Date Functions
@ 1999-11-17 17:18  Robert Hiltibidal <rob@y2k.state.il.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Robert Hiltibidal @ 1999-11-17 17:18 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: James_Jorgensen@cms.state.il.us

Afternoon,

Here's a thorny problem:

Given I have a field called entrydate and is set to type datetime, what is
the best way to pull the latest entry into that record basing the query off
of entrydate?

Currently I am using something like:

Select * from tblApplication order by EntryDate desc

That query pulls all the records. I wish to pull only one.

Thanks,

-Rob




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] Postgres Date Functions
@ 1999-11-17 18:18  Tim Joyce <tim@hoop.co.uk>
  parent: Robert Hiltibidal <rob@y2k.state.il.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tim Joyce @ 1999-11-17 18:18 UTC (permalink / raw)
  To: pgsql-interfaces; Robert Hiltibidal <rob@y2k.state.il.us>; +Cc: James_Jorgensen@cms.state.il.us

 Select * from tblApplication order by EntryDate desc LIMIT 1

should work

timj


----- Original Message -----
From: Robert Hiltibidal <rob@y2k.state.il.us>
To: <pgsql-interfaces@postgreSQL.org>
Cc: <James_Jorgensen@cms.state.il.us>
Sent: 17 November 1999 17:18
Subject: [INTERFACES] Postgres Date Functions


> Afternoon,
>
> Here's a thorny problem:
>
> Given I have a field called entrydate and is set to type datetime, what is
> the best way to pull the latest entry into that record basing the query
off
> of entrydate?
>
> Currently I am using something like:
>
> Select * from tblApplication order by EntryDate desc
>
> That query pulls all the records. I wish to pull only one.
>
> Thanks,
>
> -Rob
>
>
> ************




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-11-17 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-11-17 17:18 Postgres Date Functions Robert Hiltibidal <rob@y2k.state.il.us>
1999-11-17 18:18 ` Tim Joyce <tim@hoop.co.uk>

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