Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Wrong Results Bug in Oracle 8.1.7.1
SQL> SELECT VOUCHER_ID FROM PS_VCHR_MM_VW WHERE ROWNUM < 10;
VOUCHER_
1 SELECT VOUCHER_ID FROM PS_VCHR_MM_VW
2* WHERE VOUCHER_ID = '00003394'
SQL> /
VOUCHER_
1 row selected.
Here a function is used to force the query to do full tablescans
1 SELECT VOUCHER_ID FROM PS_VCHR_MM_VW 2* WHERE CONCAT(VOUCHER_ID,'A') = CONCAT('00003394', 'A') SQL> / VOUCHER_
I looked at the explain plan for the failing query and rebuilt the ps_voucher index. This did not change its erroneous results. I rebuilt the view itself again to no avail. A check on Metalink revealed bug 1852163. Although this bug's conditions were different from the one above, their were some similarities. One workaround for bug 1852163
alter session set "_complex_view_merging" = true;
I tried this and the original query still gave improper results.
CREATE VIEW SYSADM.PS_VCHR_MM_VW
AS
SELECT DISTINCT A.BUSINESS_UNIT, A.VOUCHER_ID, A.INVOICE_ID,
A.INVOICE_DT, A.PROCESS_INSTANCE, A.ENTRY_STATUS, A.POST_STATUS_AP,
A.MATCH_ACTION, C.PPV_POST_FLG, C.ERV_POST_FLG, A.ORIGIN FROM
SYSADM.PS_VOUCHER A, SYSADM.PS_PO_LINE_MATCHED C WHERE A.BUSINESS_UNIT =
C.BUSINESS_UNIT_AP AND A.VOUCHER_ID = C.VOUCHER_ID AND
A.MATCH_ACTION IN ('Y', 'E')
I get the expected results. The query plan matches the one for the failing statement.
Ian MacGregor
Stanford Linear Accelerator Center
ian_at_slac.stanford.edu
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: MacGregor, Ian A. INET: ian_at_SLAC.Stanford.EDU Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing ListsReceived on Sat Jun 08 2002 - 21:58:19 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
![]() |
![]() |