Page 1 of 1

Join two or more rowset

Posted: Thu Oct 02, 2014 1:06 pm
by dileonar50
I have 2 rowset worked in different ways, and they want to unite them in one txt file, knowing that I have a record in a rowset and the other multiple records, where the rowset having a record is repeated in all records

Re: Join two or more rowset

Posted: Thu Oct 02, 2014 5:32 pm
by Support_Rick
Without additional information, it will be hard to help you get this going. My understanding of what you are inquiring about would tend to lead toward a nested loop structure if you're doing all this in GADirector. In pseudo terms:
Code: Select all
ForEach Rowset1
   ForEach Rowset2
      If Rec2 = Rec1 -> Print CSV Rec with Rec1 Data and Matching Rec2 Data
   /ForEach
/ForEach
My preference would be to create a Temporary Table in your Database (MSSQL, MySQL, Oracle, DB2, etc) and write the Rowsets to 2 separate tables. Then, create a DB Query and join the 2 tables on shared information and create the single Combined Rowset and write that data to desired format (CSV, Excel, XML, Flatfile, etc)