2 Replies Latest reply on Jun 2, 2014 12:55 PM by Daniel R. Dias

    DB Adapter : How to limit number parent records in select query.

    Siddhardha M

      Hi All,


      I am querying a master-detail tables from a database.

      I want to limit the number of parent records to 15.


      Ex: Resources is parent table. It has two child tables "Skills" & "PersonalDetails".


      Resources table has 1 to many relationship with above tables.


      When i use rownum <= 15 in the where clause i am seeing different results each time.


      Sample query is as below.


      select distict t0.resourceName , t1.skillName , t2.location

      from .table_names

      where .....join between tables..

      and rownum <= 15


      Note : I selected the checkbox "Use outer joins to return a single result set for both master and detail tables" in DBAdapter wizard.


      Let me know if i am missing anything important.