Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Query Question
On Jul 23, 3: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.
Here is my query:
select t.card_srl_nmbr, t.card_stts_date from card t where
t.card_stts_date
between to_date (&start,'mm-dd-yyyy')
and to_date (&end,'mm-dd-yyyy') order by t.card_srl_nmbr
This doesn't work because it doesn't seem to like a variable prompt inside the to_date. Thanks Received on Mon Jul 23 2007 - 14:12:37 CDT
![]() |
![]() |