Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle stored procedure vagaries 1

Status
Not open for further replies.

sarahknz

Programmer
Mar 22, 2004
26
0
0
NZ
Hi

I'm working with 2 stored procedures written by someone else. My Oracle is "adequate" for the job I'm doing but this is stretching me a bit.

I have an application which calls these stored procedures and processes the data. One is happy with 35 rows returned, the other craps out at 7. Unfortunately we need that 7 to work!

So, here's the header for my SP...

Code:
CREATE OR REPLACE PACKAGE ctmsp_get_cust_alerts_pkg AS
	TYPE swId_table_type is table of NW_ALERTS.nwAlertsId%TYPE
             index by binary_integer;
	TYPE nwSeverity_table_type is table of NW_ALERTS.nwSeverity%TYPE
             index by binary_integer;
	TYPE swObjectType_table_type is table of NW_ALERTS.swObjectType%TYPE
             index by binary_integer;
	TYPE nwNote_table_type is table of NW_ALERTS.nwNote%TYPE
             index by binary_integer;

they're both identical!

We have out batch sizes etc, and they're both right. The code catching them is identical too - it's just IN parameeters and the inside the SP that differs. They use cursors and do some intensive processing but I'd have thought that wouldn't matter.

Any ideas?

 
When 2 identical procedures produce different results then the only reason is different environment. According to my own experience most frequent mistakes are

1. Wrong expectations about resolving names (e.g. somebody assumes that the procedure selects from some table hidden behind a public synonym while his own schema contains a table with the same name and some test data);
2. implicit conversions with different NLS settings (4.5.2005 may be both April 5 and May 4);
3 (2a?) comparisons with wrong type conversion expectations. E.g. 'March 3'>'April 5'

But in any case you have not provided enough information to make better asumptions.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top