[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] A "Between" Question
I have two very similar queries that are looking at date fields in the same
table in an Oracle database using the BETWEEN predicate that returns
different date results.
The first statement returns data for dates July 1 and July 2. The second
query returns data for dates July 1,2 and 3. I have confirmed that there is
data available for July 3 for the first query.
The only difference between the two fields is that the wo.ENTRY_DATE is a
required field and the wo.ACT_COMP_DATE is not.
Does anyone have any ideas why the BETWEEN in the two queries is acting so
differently?
Select
wo.work_order_no,
wo.ENTRY_DATE
FROM EWM_WORK_ORDERS wo
WHERE wo.DEPARTMENT_ID = 10432
And wo.Entry_DATE BETWEEN '01-JUL-03' and '03-JUL-03'
Select
wo.work_order_no,
wo.ACT_COMP_DATE
FROM EWM_WORK_ORDERS wo
WHERE wo.DEPARTMENT_ID = 10432
And wo.ACT_COMP_DATE BETWEEN '01-JUL-03' and '03-JUL-03'
Thanks for your help.
Dave Benzenhafer
dbenzenhafer@houston.deepwater.com
<mailto:dbenzenhafer@houston.deepwater.com>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users