Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> PL SQL Logic Error

PL SQL Logic Error

From: <wjdennis_at_my-deja.com>
Date: Fri, 01 Dec 2000 05:59:56 GMT
Message-ID: <907eoq$gr2$1@nnrp1.deja.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US