Announcement Announcement Module
Collapse
No announcement yet.
Reading multiple tables Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reading multiple tables

    Hi.

    Please could someone help me to find the most suitable solution to the following problem?

    I have two tables in a database. A master and child.

    I need to read all records from the master table and for each record returned, then get the one to many associated records from the child table.

    The aggregated data should then be output to a flat file.

    So far, I have built a simple example that reads from the master table and writes to the flat file, but now I am stuck as to the best way to get the child records.

    Any help would be much appreciated

  • #2
    Hi,
    did you ever get any responses to your query, or what approach did you eventually adopt? I'm currently mulling over the same question.

    Many thanks.

    Comment


    • #3
      Can't you just add a join to your SQL select query?

      Comment


      • #4
        Hi.

        Please help to find the suitable solution for this problem


        I have five tables in a database. One master table and four child tables.

        I need to read all records from the master table and for each record returned, then go to the first child table and pick matching records after that i go to the second child table and fetch matching records like this i need to match all five tables and pick the matching records

        as we are using db2, we will not be using join query.


        thanks in advance

        Comment

        Working...
        X