Having a database issue

  • Thread starter Thread starter DeanL
  • Start date Start date
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...
 
Back
Top