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: Smitty <marksmithy69_at_hotmail.com>
Date: Mon, 23 Jul 2007 12:29:44 -0700
Message-ID: <1185218984.304748.163730@o61g2000hsh.googlegroups.com>


On Jul 23, 3:23 pm, Michael O'Shea <michael.os..._at_tessella.com> wrote:
> 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.OS..._at_tessella.com
> __/__/__/ Tessella Support Services plc
> __/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England
> __/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301www.tessella.comRegistered in England No. 1466429

Thanks for the reply. When I try this, I get the same error as I was getting with mine:
ORA-01843: Not a valid month Received on Mon Jul 23 2007 - 14:29:44 CDT

Original text of this message

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