Re: Easy Date Searching Question

From: Andrew Finkenstadt <andy_at_vistachrome.com>
Date: Sun, 29 Aug 1993 17:25:20 GMT
Message-ID: <CCJ729.Apz_at_vistachrome.com>


ditommm_at_aa.wl.com (Mr. Matteo diTommaso) writes:
>Table Emp:
>Ename char(100)
>InDate date
>Find all employees added 12/23/92 (any time of day).
>select Ename
> from Emp
>where InDate = '23-DEC-92';
 

>Will fail?

Yes. Unless added at midnight. Use this:

SELECT ename
FROM emp
WHERE indate between '23-dec-92' and '23-dec-92'+1 ;

>Thanks.
>--
>| Matteo diTommaso (ditommm_at_aa.wl.com) | /| |
>| Ann Arbor, MI, USA | \'o.O' This space for rent. |
>| Phone: (313) 996-7148 | =(___)= |
>| (Full disclaimer available by e-mail) | U ACK! THPTPHH! |

-- 
Andrew Finkenstadt  |  andy_at_{homes.com,vistachrome.com,genie.geis.com}
Systems Analyst     |  Vista-Chrome, Homes & Land Publishing Corporation
                    |  1600 Capital Circle SW, Tallahassee Florida 32310
+1 904-575-0189     |  GEnie Postmaster, Unix & Internet RoundTables Sysop
Received on Sun Aug 29 1993 - 19:25:20 CEST

Original text of this message