6 Replies Latest reply: Feb 5, 2013 8:35 AM by shreevat RSS

    Query filtering rows in the ViewObject but works fine when run in sql

    user539616
      Hello,

      The below query returns 8 rows when run in SQL Plus but the same query when used in the viewobject, its only returning 4 rows. I tried in all possible ways but not sure what's happening.

      SELECT
      tt.assignment_number,
      tt.tab_name,
      tt.old_value,
      tt.new_value,
      tt.oracle_value
      FROM TestTable tt
      WHERE tt.ppa_id = :1
      AND ((:2 IS NULL) OR (:3 = tt.old_col))
      AND ((:4 IS NULL) OR (:5 = tt.new_col))

      Any suggestions are appreciated.

      Thanks
      --KK