| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> PL SQL Logic Error
I have a situation in PL SQL code that I don't understand. In the following block of code, I expect to get some rows in the Result_Table, but don't:
IF Fetch_Table(fetches).SPADDDT <= Effectivity_Date
THEN
Fetch_Table(fetches).SPPON := 'Y';
Valid_Row := TRUE;
END IF;
IF Valid_Row = TRUE
THEN
Result_Table(counter) := Fetch_Table(fetches);
END IF;
Yet if I force a Valid_Row := TRUE so that all rows show up in the Result_Table, as in the following block, then the rows with the proper date range do indeed have SPPON set to Y. I'm baffled. Thanks.
IF Fetch_Table(fetches).SPADDDT <= Effectivity_Date
THEN
Fetch_Table(fetches).SPPON := 'Y';
Valid_Row := TRUE;
END IF;
Valid_Row := TRUE;
IF Valid_Row = TRUE
THEN
Result_Table(counter) := Fetch_Table(fetches);
END IF;
Bill Dennis
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 30 2000 - 23:59:56 CST
![]() |
![]() |