View Full Version : eliminating dupliacted data in joined view


chrisd33
10-12-2005, 10:15 AM
hi

I have a query I'm creating that is using a joined view. I'm joining two tables and whereas the first contains unique data to each field the second contans class information so for example while all users are unique many may be assigned to the same class. When i use the join it therefore dupliactes all the class information in the query.

how can i set up the query so that the class information is only output once and not duplicated along with a user every time ?

cheers

chris

Pat Hartman
10-12-2005, 12:29 PM
The query is producing the desired result. You are having a "presentation" issue. Use a report for the main table with a subreport for the child table and your presentation issue will disappear.

chrisd33
10-13-2005, 03:11 AM
thanks.

when you say the "main" table do you mean the table that contains the primary key ?

also, i was using the query to export to xmland then run this by an xslt - can i still do this from a report ? how would i do it ?

cheers

chris

Pat Hartman
10-13-2005, 08:21 PM
I have only played with the import/export to XML so I don't know what I'm talking about but I think if you use the wizard and export the main table (or a query based on it) you also get the opportunity to export the many-side table (or a query based on it. The problem is that once you join the two tables, XML cannot recognize the true structure of the data because it looks at the query rather than the underlying tables. Hopefully that helps you understand the problem. Solving it is another thing:)