Having a database issue

D

DeanL

Hi guys,

I'm having a small issue extracting data from a database view to XML. I can easily get the data out in a large file that includes all the data but the issue I'm having is that my client requires several individual XML files each containing 1 database record saved with the record key as the filename..

Example:

4 rows returned:

KEY,VALUE1
1, a
2, b
3, c
4, d

File: 1.xml

<ROW>
<KEY>1</KEY>
<VALUE>a</VALUE>
</ROW>

File: 2.xml

<ROW>
<KEY>2</KEY>
<VALUE>b</VALUE>
</ROW>

File: 3.xml

<ROW>
<KEY>3</KEY>
<VALUE>c</VALUE>
</ROW>

File: 4.xml

<ROW>
<KEY>4</KEY>
<VALUE>d</VALUE>
</ROW>

4 rows returned, four files created.

Any help on this strange request would be so appreciated.

Many thanks, DeanL...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top