Morning,
I presently return XML via SQL for a number of cases in a query, I build the XML and then the XML is fired off to a web service to update our back office system.
At present what I do is write a SQL query to get the list of records I need to generate the XML for, and then have a second SQL query loop through that list and create the XML - very inefficient from the point of view of SQL.
So I figured it'd be easier to obtain the full list and then loop through with VC XML's Read Node. My XML is like the following
<qrylist>
<xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
<xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
<xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
</qrylist>
What I want to do is be able to loop through and select each xmlqry element and its subsequent data, my example of how I expect the "Full Output" of VisualCron would be from
1 <xmlqry>
2 <name></name>
3 <addr1></addr1>
4 <tel></tel>
5 </xmlqry>
6 <xmlqry>
7 <name></name>
8 <addr1></addr1>
9 <tel></tel>
10 </xmlqry>
11 <xmlqry>
12 <name></name>
13 <addr1></addr1>
14 <tel></tel>
15 </xmlqry>
To This
1 <xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
2 <xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
3 <xmlqry>
<name></name>
<addr1></addr1>
<tel></tel>
</xmlqry>
So it treats each XMLQRY element and its data as a seperate line so that I can loop through and fire them off to the webservice.
The help on this would be appreciated as it will fix a number of performance issues with queries.
Edited by user
2020-04-17T07:39:49Z
|
Reason: Not specified