3 Replies Latest reply on Jul 28, 2013 12:00 AM by GuyStevens

    Selection Across related tables



      Selection Across related tables


           I am trying to do a find across tables - here would be a simple example of what I would be trying to do. 

           A database that has two tables - one for individuals and their addresses and phone numbers, and another one with the transactions (date purchased, product). These are connected by a unique ID assigned to the individual and is used when creating the transaction purchase. 

           I want to find those people who live in Ohio and purchased a sweater. Additionally I want to show what city/town they live in and the date of the purchase.

           So the idea is to select on a single field in two two different tables and show a couple of fields from each of the two tables.  


        • 1. Re: Selection Across related tables

               This is actually probably a lot simpler then you think.
               One way would be to create a list view based on your transaction table. And you just add any fields you want from both tables.

               That means you can add the product field from the transaction table, but also the individuals name and city etc. from the first table.

               If there are multiple purchases for a particular individual you will see their name appear multiple times, but that's no problem.

               Now you can go into find mode and enter multiple values into multiple fields.

               If you added the City field you can enter a city. And then in the product field you enter the product you want to search. For instance 'sweater'.

               Hit perform find and you should get what you were looking for.

               In this list view you can add all kinds of funky things like sub summary parts and global fields to help you more easily enter values to search on.

               But that's all a little more advanced.



          • 2. Re: Selection Across related tables

                 Thanks - that works for displaying the data - but what I would like to do is take the data selected and export it as a flat file to be imported into SPSS for data analysis.

            • 3. Re: Selection Across related tables

                   You can just export this data.

                   File - Export Records.

                   You can export fields from different related tables at the same time.