Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pl/sql not equal question

SeshuGiriJul 21 2008 — edited Jul 21 2008

I have a Plsql logic like below, it seems like I have problem at some IF statement. becuase my select is returning a record like

123	HDD	40	41

and the control suppose to fall into that IF condition in this case because 40 <> 41, but it's not can anybody tell me why?

      FOR Y IN
         (SELECT ID, ITEM, AMOUNT, TOTAL_AMT
            FROM (SELECT   ID, ITEM,
                           AMOUNT,
                           SUM (OTHER_AMT) AS TOTAL_AMT
                      FROM (SELECT ID, ITEM, AMOUNT
                                   OTHER_AMT
                              FROM ITEM_TEST
                              AND ID = '1000')
                  GROUP BY ID, ITEM, AMOUNT)
           WHERE TOTAL_AMT <> AMOUNT
           )
      LOOP

	 IF Y.AMOUNT <> Y.TOTAL_AMT
         THEN

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2008
Added on Jul 21 2008
6 comments
761 views