Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query Question

Re: Simple Query Question

From: Michael O'Shea <michael.oshea_at_tessella.com>
Date: Mon, 23 Jul 2007 12:23:21 -0700
Message-ID: <1185218601.029075.301930@r34g2000hsd.googlegroups.com>


On Jul 23, 8:09 pm, Smitty <marksmith..._at_hotmail.com> wrote:
> Hello everyone. I have a table with a DATE column, which defaults to
> the sysdate during inserts etc.. It's format is 4/26/2007 3:26:22
> PM. How can I select all records from this table, where this DATE is
> between two 'prompted' dates? I am a newbie, so I apologize for the
> simple question. Thanks a lot.

Hi, if you're up to using sqlplus, try something like the following.

select something
  from somewhere

     where yourDateColumn between to_date('&d1','dd-mon-yyyy') and to_date('&d2','dd-mon-yyyy')

Change the date mask to whatever you require. Regards
Mike

TESSELLA Michael.OShea_at_tessella.com

__/__/__/ Tessella Support Services plc
__/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England
__/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301
www.tessella.com Registered in England No. 1466429 Received on Mon Jul 23 2007 - 14:23:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US