8 Replies Latest reply: Sep 20, 2012 2:22 PM by Richard Lowe RSS

    Link Table Help on a Sample

      Hello, can you please help with this much simplified scenario I am wrestling with?

       

      Example:

      Table1

        ColA   (primary key)

        ColB

       

      Table2

        ColA

        ColB

       

      Table3

        ColB  (primary key)

       

      I need to just load these which will create a loop.  I think i just need a Link table, but not exactly sure of the load syntax.  Can someone please help?

       

      Thanks very much.

        • Re: Link Table Help on a Sample

          Dear,

           

          if you have more than one comman filed between tables ,than you can do the following approches.

           

          1)Apply the concatenation between the tables, so that tables will be merged as one table.

          2)Join the two tables like ,in your sample join table2 and Table 3 ,than rename the filed than goto link with other table1.

           

          hope this one will help you.

           

           

          Thanks,

          Mukram.

          • Re: Link Table Help on a Sample

            In case it helps, here is what QV does to get this to work creating the synthetic key.  Basically I just need to create this key during the load the 'right' way instead of letting QV do it for me.   But i am struggling......

            (slightly different table names in this pic, but the same exact structure as the original post)

             

            Capture.PNG

              • Re: Link Table Help on a Sample

                Dear,

                 

                 

                you can avoid the synthetic key like

                 

                Rename the ColB Filed in table1 as NewFiled.

                 

                Table1:

                  ColA ,

                  ColB as NewField

                 

                Table2:

                  ColA

                  ColB

                 

                Table3:

                  ColB

                 

                                                            export.png

                Your model will look like this.

                 

                Thanks,

                Mukram.

                  • Re: Link Table Help on a Sample

                    Thanks very much.   This works fine for table1 to table2 or table2 to table3 selections, but there is no link between table 3 and table 1.   So selecting any data in table3 results in incorrect information in table1. 

                    Here is the table layout and some sample data where you can see selecting data in 3 does not have available a connection to get back to the correct data in table1.

                    Please let me know if you have any idea how to get this to work and THANK YOU AGAIN!

                    Richard

                     

                    Capture3.PNG

                     

                    Capture4.PNG

                • Re: Link Table Help on a Sample
                  Fernando Suzuki

                  As I see from the sample structure you described, it seems as the tables could be concatenated or joined as mukram suggested.

                   

                  Anyway, check the attached file for an example with LinkTable.

                   

                   

                  Hope this helps

                  Fernando

                  • Re: Link Table Help on a Sample

                    Using an OUTER JOIN in the key table resolved the issue.   Concatenate resulted in multiple rows for each index making it harder (probably not impossible though) to create expressions in the application.