RE: Executing wrong sql
Date: Fri, 10 Oct 2008 13:30:02 -0400
Message-ID: <21469B88E0EA11498818517F210335310455B6CF@EPRI17P32001A.csfb.cs-group.com>
What's issuing the code? I have seen cases in which, for example,
Microsoft client-side development environments make changes to SQL
before submitting to the database.
Paul Baumgartel
CREDIT SUISSE
Information Technology
Prime Services Databases Americas
One Madison Avenue
New York, NY 10010
USA
Phone 212.538.1143
paul.baumgartel_at_credit-suisse.com
www.credit-suisse.com
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sandra Becker
Sent: Friday, October 10, 2008 1:13 PM
To: guillermo.bort_at_eds.com
Cc: oracle-l
Subject: Re: Executing wrong sql
CURSOR_SHARING is set to EXACT.
Here is a sanitized version of the section of code we're having problems with:
.
.
.
DECLARE
CURSOR pvi1 IS
SELECT DISTINCT mi.docid, mi.invnumber,
mi.datereceived
FROM invpayment ip, mbinv mi
WHERE ip.invnumber = mi.invnumber
AND mi.boid = incoid
AND substr(mi.soid, 0, 12) =
substr(vndr.partnerid, 0, 12)
AND mi.ISDELETED != '1'
AND mi.state = 'Imported'
AND mi.datereceived BETWEEN inStartDate AND
nvl(inEndDate, add_months(inStartDate, 6));
BEGIN
IF (invpdcnt != 0)
.
.
.
The line that is bold/italic seems to be getting changed to
AND substr(mi.boid,0,12) = substr(incoid,0,12)
The script is very lengthy so I didn't want to put all of it in the thread.
Sandy
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 10 2008 - 12:30:02 CDT
