Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Simple Access Question

From: trevor_d_matthews@-------.--- (-- --------)
To: NULL
Date: 7/1/2004 10:10:00 AM
I have a simple question (I think). I have 2 tables - states and
employees, and I want a breakdown of cities in those states in this
form. With the city as a child of the state - I'm new to XML so please
excuse it's innacuracy as I know it's not correct.

<StateCity>
  <state_code>AK
    <city>Anchorage</city>
    <city>Cantwell</city>
    <city>Cooper Landing</city>
  </state_code>
</StateCity>

When I export the results from my query

SELECT 
      STATELIST.state_code, EMPLOYEE.city
FROM 
      STATELIST 
          INNER JOIN EMPLOYEE ON STATELIST.state_code = EMPLOYEE.state
GROUP BY 
      STATELIST.state_code, EMPLOYEE.city
ORDER BY 
      STATELIST.state_code, EMPLOYEE.city;

the XML comes out like this.

<StateCity>
<state_code>AK</state_code>
<city>Anchorage</city>
</StateCity>
<StateCity>
<state_code>AK</state_code>
<city>Cantwell</city>
</StateCity>
<StateCity>
<state_code>AK</state_code>
<city>Cooper Landing</city>
</StateCity>

Anyone know how to show the relationship in the export?


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent