Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Simple Access Question

From: "David Carnes" <davidc@----------------.--->
To: NULL
Date: 7/1/2004 2:18:00 PM
TD:
When you run the SQL, you should see something like this in the results:

state_code                   city
AK                             Anchorage
AK                             Cantwell
AK                             Cooper Landing

Your XML is reflecting the data in each row.  Since you want the data in a
more hierarchical format, you'll need to use Data Shaping.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;189657

In Access:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;185425

extracting data:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q191/7/44.ASP&NoWebContent=1


I've used this technique to pull data from an Oracle database via ADO, and
also inside Access (97 and 2000) to create hierarchal recordsets.

HTH!
Dave


"TD Matthews" <trevor_d_matthews@h...> wrote in message
news:a14bc00c.0407010909.4d4527cc@p......
> 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