473,503 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Query- XML Place Multiple Results into Multiple Nodes

2 New Member
This is my query:

Expand|Select|Wrap|Line Numbers
  1. select  rc.[race number] AS RaceNumber,
  2.     max(case when seqnum = 1 then title1 end) as title1,
  3.     max(case when seqnum = 1 then [precinct percent] end) as PrecintPercent,
  4.     max(case when seqnum = 1 then [candidate num] end) as Winner,
  5.     max(case when seqnum = 1 then Votes end) as WinningVotes,
  6.     max(case when seqnum = 1 then party end) as WinningParty,
  7.     max(case when seqnum = 1 then leader end) as Winner1,
  8.     max(case when seqnum = 1 then CAST(winner AS tinyint) end) as WinnerSelected,
  9.     max(case when seqnum = 1 then [leader percent] end) as WinnerPercent,
  10.     max(case when seqnum = 2 then [candidate num] end) as Loser,
  11.     max(case when seqnum = 2 then Votes end) as LosingVotes,
  12.     max(case when seqnum = 2 then party end) as LosingParty,
  13.     max(case when seqnum = 2 then leader2 end) as Loser2,
  14.     max(case when seqnum = 2 then [leader2 percent] end) as LoserPercent,
  15.     max(case when seqnum = 2 then CAST(winner AS tinyint) end) as LoserSelected,
  16.     max(case when seqnum = 3 then title1 end) as title1,
  17.     max(case when seqnum = 3 then [precinct percent] end) as PrecintPercent,
  18.     max(case when seqnum = 3 then [candidate num] end) as Winner,
  19.     max(case when seqnum = 3 then Votes end) as WinningVotes,
  20.     max(case when seqnum = 3 then party end) as WinningParty,
  21.     max(case when seqnum = 3 then [first name]+[last name] end) as Winner,
  22.     max(case when seqnum = 3 then CAST(winner AS tinyint) end) as WinnerSelected,
  23.     max(case when seqnum = 4 then [precinct percent] end) as PrecintPercent,
  24.     max(case when seqnum = 4 then [candidate num] end) as Loser,
  25.     max(case when seqnum = 4 then Votes end) as LosingVotes,
  26.     max(case when seqnum = 4 then party end) as LosingParty,
  27.     max(case when seqnum = 4 then [first name]+[last name] end) as Loser,
  28.     max(case when seqnum = 4 then CAST(winner AS tinyint) end) as LoserSelected,
  29.     max(case when seqnum = 5 then title1 end) as title1,
  30.     max(case when seqnum = 5 then [precinct percent] end) as PrecintPercent,
  31.     max(case when seqnum = 5 then [candidate num] end) as Winner,
  32.     max(case when seqnum = 5 then Votes end) as WinningVotes,
  33.     max(case when seqnum = 5 then party end) as WinningParty,
  34.     max(case when seqnum = 5 then [first name]+[last name] end) as Winner,
  35.     max(case when seqnum = 5 then CAST(winner AS tinyint) end) as WinnerSelected,
  36.     max(case when seqnum = 6 then [precinct percent] end) as PrecintPercent,
  37.     max(case when seqnum = 6 then [candidate num] end) as Loser,
  38.     max(case when seqnum = 6 then Votes end) as LosingVotes,
  39.     max(case when seqnum = 6 then party end) as LosingParty,
  40.     max(case when seqnum = 6 then [first name]+[last name] end) as Loser,
  41.     max(case when seqnum = 6 then CAST(winner AS tinyint) end) as LoserSelected,
  42.     max(case when seqnum = 7 then title1 end) as title1,
  43.     max(case when seqnum = 7 then [precinct percent] end) as PrecintPercent,
  44.     max(case when seqnum = 7 then [candidate num] end) as Winner,
  45.     max(case when seqnum = 7 then Votes end) as WinningVotes,
  46.     max(case when seqnum = 7 then party end) as WinningParty,
  47.     max(case when seqnum = 7 then [first name]+[last name] end) as Winner,
  48.     max(case when seqnum = 7 then CAST(winner AS tinyint) end) as WinnerSelected,
  49.     max(case when seqnum = 8 then [precinct percent] end) as PrecintPercent,
  50.     max(case when seqnum = 8 then [candidate num] end) as Loser,
  51.     max(case when seqnum = 8 then Votes end) as LosingVotes,
  52.     max(case when seqnum = 8 then party end) as LosingParty,
  53.     max(case when seqnum = 8 then [first name]+[last name] end) as Loser,
  54.     max(case when seqnum = 8 then CAST(winner AS tinyint) end) as LoserSelected,
  55.     max(case when seqnum = 9 then title1 end) as title1,
  56.     max(case when seqnum = 9 then [precinct percent] end) as PrecintPercent,
  57.     max(case when seqnum = 9 then [candidate num] end) as Winner,
  58.     max(case when seqnum = 9 then Votes end) as WinningVotes,
  59.     max(case when seqnum = 9 then party end) as WinningParty,
  60.     max(case when seqnum = 9 then [first name]+[last name] end) as Winner,
  61.     max(case when seqnum = 9 then CAST(winner AS tinyint) end) as WinnerSelected,
  62.     max(case when seqnum = 10 then [precinct percent] end) as PrecintPercent,
  63.     max(case when seqnum = 10 then [candidate num] end) as Loser,
  64.     max(case when seqnum = 10 then Votes end) as LosingVotes,
  65.     max(case when seqnum = 10 then party end) as LosingParty,
  66.     max(case when seqnum = 10 then [first name]+[last name] end) as Loser,
  67.     max(case when seqnum = 10 then CAST(winner AS tinyint) end) as LoserSelected,
  68.     max(case when seqnum = 11 then title1 end) as title1,
  69.     max(case when seqnum = 11 then [precinct percent] end) as PrecintPercent,
  70.     max(case when seqnum = 11 then [candidate num] end) as Winner,
  71.     max(case when seqnum = 11 then Votes end) as WinningVotes,
  72.     max(case when seqnum = 11 then party end) as WinningParty,
  73.     max(case when seqnum = 11 then [first name]+[last name] end) as Winner,
  74.     max(case when seqnum = 11 then CAST(winner AS tinyint) end) as WinnerSelected,
  75.     max(case when seqnum = 12 then [precinct percent] end) as PrecintPercent,
  76.     max(case when seqnum = 12 then [candidate num] end) as Loser,
  77.     max(case when seqnum = 12 then Votes end) as LosingVotes,
  78.     max(case when seqnum = 12 then party end) as LosingParty,
  79.     max(case when seqnum = 12 then [first name]+[last name] end) as Loser,
  80.     max(case when seqnum = 12 then CAST(winner AS tinyint) end) as LoserSelected,
  81.     max(case when seqnum = 13 then title1 end) as title1,
  82.     max(case when seqnum = 13 then [precinct percent] end) as PrecintPercent,
  83.     max(case when seqnum = 13 then [candidate num] end) as Winner,
  84.     max(case when seqnum = 13 then Votes end) as WinningVotes,
  85.     max(case when seqnum = 13 then party end) as WinningParty,
  86.     max(case when seqnum = 13 then [first name]+[last name] end) as Winner,
  87.     max(case when seqnum = 13 then CAST(winner AS tinyint) end) as WinnerSelected,
  88.     max(case when seqnum = 14 then [precinct percent] end) as PrecintPercent,
  89.     max(case when seqnum = 14 then [candidate num] end) as Loser,
  90.     max(case when seqnum = 14 then Votes end) as LosingVotes,
  91.     max(case when seqnum = 14 then party end) as LosingParty,
  92.     max(case when seqnum = 14 then [first name]+[last name] end) as Loser,
  93.     max(case when seqnum = 14 then CAST(winner AS tinyint) end) as LoserSelected,
  94.     max(case when seqnum = 15 then title1 end) as title1,
  95.     max(case when seqnum = 15 then [precinct percent] end) as PrecintPercent,
  96.     max(case when seqnum = 15 then [candidate num] end) as Winner,
  97.     max(case when seqnum = 15 then Votes end) as WinningVotes,
  98.     max(case when seqnum = 15 then party end) as WinningParty,
  99.     max(case when seqnum = 15 then [first name]+[last name] end) as Winner,
  100.     max(case when seqnum = 15 then CAST(winner AS tinyint) end) as WinnerSelected,
  101.     max(case when seqnum = 16 then [precinct percent] end) as PrecintPercent,
  102.     max(case when seqnum = 16 then [candidate num] end) as Loser,
  103.     max(case when seqnum = 16 then Votes end) as LosingVotes,
  104.     max(case when seqnum = 16 then party end) as LosingParty,
  105.     max(case when seqnum = 16 then [first name]+[last name] end) as Loser,
  106.     max(case when seqnum = 16 then CAST(winner AS tinyint) end) as LoserSelected,
  107.     max(case when seqnum = 17 then title1 end) as title1,
  108.     max(case when seqnum = 17 then [precinct percent] end) as PrecintPercent,
  109.     max(case when seqnum = 17 then [candidate num] end) as Winner,
  110.     max(case when seqnum = 17 then Votes end) as WinningVotes,
  111.     max(case when seqnum = 17 then party end) as WinningParty,
  112.     max(case when seqnum = 17 then [first name]+[last name] end) as Winner,
  113.     max(case when seqnum = 17 then CAST(winner AS tinyint) end) as WinnerSelected,
  114.     max(case when seqnum = 18 then [precinct percent] end) as PrecintPercent,
  115.     max(case when seqnum = 18 then [candidate num] end) as Loser,
  116.     max(case when seqnum = 18 then Votes end) as LosingVotes,
  117.     max(case when seqnum = 18 then party end) as LosingParty,
  118.     max(case when seqnum = 18 then [first name]+[last name] end) as Loser,
  119.     max(case when seqnum = 18 then CAST(winner AS tinyint) end) as LoserSelected,
  120.     max(case when seqnum = 19 then title1 end) as title1,
  121.     max(case when seqnum = 19 then [precinct percent] end) as PrecintPercent,
  122.     max(case when seqnum = 19 then [candidate num] end) as Winner,
  123.     max(case when seqnum = 19 then Votes end) as WinningVotes,
  124.     max(case when seqnum = 19 then party end) as WinningParty,
  125.     max(case when seqnum = 19 then [first name]+[last name] end) as Winner,
  126.     max(case when seqnum = 19 then CAST(winner AS tinyint) end) as WinnerSelected,
  127.     max(case when seqnum = 20 then [precinct percent] end) as PrecintPercent,
  128.     max(case when seqnum = 20 then [candidate num] end) as Loser,
  129.     max(case when seqnum = 20 then Votes end) as LosingVotes,
  130.     max(case when seqnum = 20 then party end) as LosingParty,
  131.     max(case when seqnum = 20 then [first name]+[last name] end) as Loser,
  132.     max(case when seqnum = 20 then CAST(winner AS tinyint) end) as LoserSelected,
  133.     max(case when seqnum = 21 then title1 end) as title1,
  134.     max(case when seqnum = 21 then [precinct percent] end) as PrecintPercent,
  135.     max(case when seqnum = 21 then [candidate num] end) as Winner,
  136.     max(case when seqnum = 21 then Votes end) as WinningVotes,
  137.     max(case when seqnum = 21 then party end) as WinningParty,
  138.     max(case when seqnum = 21 then [first name]+[last name] end) as Winner,
  139.     max(case when seqnum = 21 then CAST(winner AS tinyint) end) as WinnerSelected
  140.  
  141. from 
  142. (
  143. select  
  144.         r.title1,
  145.         r.[precinct percent],
  146.         rc.[race number],
  147.         rc.[candidate num],
  148.         rc.[Votes],
  149.         rc.[winner],
  150.         c.[party],
  151.         r.[leader],
  152.         r.[leader percent],
  153.         r.[leader2],
  154.         r.[leader2 percent],
  155.         c.[first name],
  156.         c.[last name],
  157.  
  158.  
  159.             row_number() over (partition by rc.[race number] order by votes desc) as seqnum
  160.     from    dbo.[RACE CANDIDATES] rc
  161.     inner join dbo.[CANDIDATE] c    on  rc.[candidate num]  = c.[candidate number]
  162.     inner join dbo.[RACE] r
  163.      on rc.[race number] = r.[race number] 
  164.  
  165. ) rc
  166. group by rc.[race number]
  167. FOR XML PATH ('ELECTION'), ROOT('root')
This is the XML output from one of the races:

Expand|Select|Wrap|Line Numbers
  1. <ELECTION>
  2.     <RaceNumber>149</RaceNumber>
  3.     <title1>Henry County Board Dist. 2</title1>
  4.     <PrecintPercent>100</PrecintPercent>
  5.     <Winner>5213</Winner>
  6.     <WinningVotes>5140</WinningVotes>
  7.     <WinningParty>D</WinningParty>
  8.     <Winner1>Janice May</Winner1>
  9.     <WinnerSelected>1</WinnerSelected>
  10.     <WinnerPercent>7</WinnerPercent>
  11.     <Loser>5215</Loser>
  12.     <LosingVotes>4690</LosingVotes>
  13.     <LosingParty>D</LosingParty>
  14.     <Loser2>Ted Sturtevant</Loser2>
  15.     <LoserPercent>7</LoserPercent>
  16.     <LoserSelected>1</LoserSelected>
  17.     <title1>Henry County Board Dist. 2</title1>
  18.     <PrecintPercent>100</PrecintPercent>
  19.     <Winner>5214</Winner>
  20.     <WinningVotes>4564</WinningVotes>
  21.     <WinningParty>D</WinningParty>
  22.     <Winner>JohnSovanski</Winner>
  23.     <WinnerSelected>1</WinnerSelected>
  24.     <PrecintPercent>100</PrecintPercent>
  25.     <Loser>5221</Loser>
  26.     <LosingVotes>4368</LosingVotes>
  27.     <LosingParty>R</LosingParty>
  28.     <Loser>RogerGradert</Loser>
  29.     <LoserSelected>1</LoserSelected>
  30.     <title1>Henry County Board Dist. 2</title1>
  31.     <PrecintPercent>100</PrecintPercent>
  32.     <Winner>5220</Winner>
  33.     <WinningVotes>4321</WinningVotes>
  34.     <WinningParty>D</WinningParty>
  35.     <Winner>ThomasMay</Winner>
  36.     <WinnerSelected>1</WinnerSelected>
  37.     <PrecintPercent>100</PrecintPercent>
  38.     <Loser>5225</Loser>
  39.     <LosingVotes>4168</LosingVotes>
  40.     <LosingParty>R</LosingParty>
  41.     <Loser>DennisAnderson</Loser>
  42.     <LoserSelected>1</LoserSelected>
  43.     <title1>Henry County Board Dist. 2</title1>
  44.     <PrecintPercent>100</PrecintPercent>
  45.     <Winner>5216</Winner>
  46.     <WinningVotes>4123</WinningVotes>
  47.     <WinningParty>D</WinningParty>
  48.     <Winner>JamesFindley</Winner>
  49.     <WinnerSelected>1</WinnerSelected>
  50.     <PrecintPercent>100</PrecintPercent>
  51.     <Loser>5217</Loser>
  52.     <LosingVotes>4036</LosingVotes>
  53.     <LosingParty>D</LosingParty>
  54.     <Loser>ThomasWiley</Loser>
  55.     <LoserSelected>1</LoserSelected>
  56.     <title1>Henry County Board Dist. 2</title1>
  57.     <PrecintPercent>100</PrecintPercent>
  58.     <Winner>5222</Winner>
  59.     <WinningVotes>4031</WinningVotes>
  60.     <WinningParty>R</WinningParty>
  61.     <Winner>KippyNelson</Winner>
  62.     <WinnerSelected>0</WinnerSelected>
  63.     <PrecintPercent>100</PrecintPercent>
  64.     <Loser>5230</Loser>
  65.     <LosingVotes>3937</LosingVotes>
  66.     <LosingParty>R</LosingParty>
  67.     <Loser>WilliamLesage</Loser>
  68.     <LoserSelected>0</LoserSelected>
  69.     <title1>Henry County Board Dist. 2</title1>
  70.     <PrecintPercent>100</PrecintPercent>
  71.     <Winner>5228</Winner>
  72.     <WinningVotes>3832</WinningVotes>
  73.     <WinningParty>R</WinningParty>
  74.     <Winner>KelliParsons</Winner>
  75.     <WinnerSelected>0</WinnerSelected>
  76.     <PrecintPercent>100</PrecintPercent>
  77.     <Loser>5227</Loser>
  78.     <LosingVotes>3739</LosingVotes>
  79.     <LosingParty>R</LosingParty>
  80.     <Loser>MarshallJones</Loser>
  81.     <LoserSelected>0</LoserSelected>
  82.     <title1>Henry County Board Dist. 2</title1>
  83.     <PrecintPercent>100</PrecintPercent>
  84.     <Winner>5229</Winner>
  85.     <WinningVotes>3638</WinningVotes>
  86.     <WinningParty>R</WinningParty>
  87.     <Winner>TerrySears</Winner>
  88.     <WinnerSelected>0</WinnerSelected>
  89.     <PrecintPercent>100</PrecintPercent>
  90.     <Loser>5223</Loser>
  91.     <LosingVotes>3531</LosingVotes>
  92.     <LosingParty>R</LosingParty>
  93.     <Loser>RebekahMcCaw</Loser>
  94.     <LoserSelected>0</LoserSelected>
  95.     <title1>Henry County Board Dist. 2</title1>
  96.     <PrecintPercent>100</PrecintPercent>
  97.     <Winner>5218</Winner>
  98.     <WinningVotes>3418</WinningVotes>
  99.     <WinningParty>D</WinningParty>
  100.     <Winner>EricHollaway</Winner>
  101.     <WinnerSelected>0</WinnerSelected>
  102.     <PrecintPercent>100</PrecintPercent>
  103.     <Loser>5226</Loser>
  104.     <LosingVotes>3184</LosingVotes>
  105.     <LosingParty>R</LosingParty>
  106.     <Loser>ThomasMillsaps</Loser>
  107.     <LoserSelected>0</LoserSelected>
  108.     <title1>Henry County Board Dist. 2</title1>
  109.     <PrecintPercent>100</PrecintPercent>
  110.     <Winner>5219</Winner>
  111.     <WinningVotes>3102</WinningVotes>
  112.     <WinningParty>D</WinningParty>
  113.     <Winner>SammieBorst</Winner>
  114.     <WinnerSelected>0</WinnerSelected>
  115.     <PrecintPercent>100</PrecintPercent>
  116.     <Loser>5224</Loser>
  117.     <LosingVotes>3003</LosingVotes>
  118.     <LosingParty>R</LosingParty>
  119.     <Loser>DonaldDedobbelaere</Loser>
  120.     <LoserSelected>0</LoserSelected>
  121.     <title1>Henry County Board Dist. 2</title1>
  122.     <PrecintPercent>100</PrecintPercent>
  123.     <Winner>5374</Winner>
  124.     <WinningVotes>0</WinningVotes>
  125.     <WinningParty>D</WinningParty>
  126.     <Winner>JamesKursock</Winner>
  127.     <WinnerSelected>1</WinnerSelected>
  128.     <PrecintPercent>100</PrecintPercent>
  129.     <Loser>5375</Loser>
  130.     <LosingVotes>0</LosingVotes>
  131.     <LosingParty>D</LosingParty>
  132.     <Loser>JerryThompson</Loser>
  133.     <LoserSelected>1</LoserSelected>
  134.   </ELECTION>
I am trying to get the output to be like this:

Expand|Select|Wrap|Line Numbers
  1.  <ELECTION>
  2.     <RaceNumber>149</RaceNumber>
  3.     <title1>Henry County Board Dist. 2</title1>
  4.     <PrecintPercent>100</PrecintPercent>
  5.     <Winner>5213</Winner>
  6.     <WinningVotes>5140</WinningVotes>
  7.     <WinningParty>D</WinningParty>
  8.     <Winner1>Janice May</Winner1>
  9.     <WinnerSelected>1</WinnerSelected>
  10.     <WinnerPercent>7</WinnerPercent>
  11.     <Loser>5215</Loser>
  12.     <LosingVotes>4690</LosingVotes>
  13.     <LosingParty>D</LosingParty>
  14.     <Loser2>Ted Sturtevant</Loser2>
  15.     <LoserPercent>7</LoserPercent>
  16.     <LoserSelected>1</LoserSelected>
  17. </ELECTION>
  18. <ELECTION>
  19.     <title1>Henry County Board Dist. 2</title1>
  20.     <PrecintPercent>100</PrecintPercent>
  21.     <Winner>5214</Winner>
  22.     <WinningVotes>4564</WinningVotes>
  23.     <WinningParty>D</WinningParty>
  24.     <Winner>JohnSovanski</Winner>
  25.     <WinnerSelected>1</WinnerSelected>
  26.     <PrecintPercent>100</PrecintPercent>
  27.     <Loser>5221</Loser>
  28.     <LosingVotes>4368</LosingVotes>
  29.     <LosingParty>R</LosingParty>
  30.     <Loser>RogerGradert</Loser>
  31.     <LoserSelected>1</LoserSelected>
  32. </ELECTION>
  33. <ELECTION>
  34.     <title1>Henry County Board Dist. 2</title1>
  35.     <PrecintPercent>100</PrecintPercent>
  36.     <Winner>5220</Winner>
  37.     <WinningVotes>4321</WinningVotes>
  38.     <WinningParty>D</WinningParty>
  39.     <Winner>ThomasMay</Winner>
  40.     <WinnerSelected>1</WinnerSelected>
  41.     <PrecintPercent>100</PrecintPercent>
  42.     <Loser>5225</Loser>
  43.     <LosingVotes>4168</LosingVotes>
  44.     <LosingParty>R</LosingParty>
  45.     <Loser>DennisAnderson</Loser>
  46.     <LoserSelected>1</LoserSelected>
  47. </ELECTION>
  48. <ELECTION>
  49.     <title1>Henry County Board Dist. 2</title1>
  50.     <PrecintPercent>100</PrecintPercent>
  51.     <Winner>5216</Winner>
  52.     <WinningVotes>4123</WinningVotes>
  53.     <WinningParty>D</WinningParty>
  54.     <Winner>JamesFindley</Winner>
  55.     <WinnerSelected>1</WinnerSelected>
  56.     <PrecintPercent>100</PrecintPercent>
  57.     <Loser>5217</Loser>
  58.     <LosingVotes>4036</LosingVotes>
  59.     <LosingParty>D</LosingParty>
  60.     <Loser>ThomasWiley</Loser>
  61.     <LoserSelected>1</LoserSelected>
  62. </ELECTION>
  63. <ELECTION>
  64.     <title1>Henry County Board Dist. 2</title1>
  65.     <PrecintPercent>100</PrecintPercent>
  66.     <Winner>5222</Winner>
  67.     <WinningVotes>4031</WinningVotes>
  68.     <WinningParty>R</WinningParty>
  69.     <Winner>KippyNelson</Winner>
  70.     <WinnerSelected>0</WinnerSelected>
  71.     <PrecintPercent>100</PrecintPercent>
  72.     <Loser>5230</Loser>
  73.     <LosingVotes>3937</LosingVotes>
  74.     <LosingParty>R</LosingParty>
  75.     <Loser>WilliamLesage</Loser>
  76.     <LoserSelected>0</LoserSelected>
  77. </ELECTION>
  78. <ELECTION>
  79.     <title1>Henry County Board Dist. 2</title1>
  80.     <PrecintPercent>100</PrecintPercent>
  81.     <Winner>5228</Winner>
  82.     <WinningVotes>3832</WinningVotes>
  83.     <WinningParty>R</WinningParty>
  84.     <Winner>KelliParsons</Winner>
  85.     <WinnerSelected>0</WinnerSelected>
  86.     <PrecintPercent>100</PrecintPercent>
  87.     <Loser>5227</Loser>
  88.     <LosingVotes>3739</LosingVotes>
  89.     <LosingParty>R</LosingParty>
  90.     <Loser>MarshallJones</Loser>
  91.     <LoserSelected>0</LoserSelected>
  92. </ELECTION>
  93. <ELECTION>
  94.     <title1>Henry County Board Dist. 2</title1>
  95.     <PrecintPercent>100</PrecintPercent>
  96.     <Winner>5229</Winner>
  97.     <WinningVotes>3638</WinningVotes>
  98.     <WinningParty>R</WinningParty>
  99.     <Winner>TerrySears</Winner>
  100.     <WinnerSelected>0</WinnerSelected>
  101.     <PrecintPercent>100</PrecintPercent>
  102.     <Loser>5223</Loser>
  103.     <LosingVotes>3531</LosingVotes>
  104.     <LosingParty>R</LosingParty>
  105.     <Loser>RebekahMcCaw</Loser>
  106.     <LoserSelected>0</LoserSelected>
  107. </ELECTION>
  108. <ELECTION>
  109.     <title1>Henry County Board Dist. 2</title1>
  110.     <PrecintPercent>100</PrecintPercent>
  111.     <Winner>5218</Winner>
  112.     <WinningVotes>3418</WinningVotes>
  113.     <WinningParty>D</WinningParty>
  114.     <Winner>EricHollaway</Winner>
  115.     <WinnerSelected>0</WinnerSelected>
  116.     <PrecintPercent>100</PrecintPercent>
  117.     <Loser>5226</Loser>
  118.     <LosingVotes>3184</LosingVotes>
  119.     <LosingParty>R</LosingParty>
  120.     <Loser>ThomasMillsaps</Loser>
  121.     <LoserSelected>0</LoserSelected>
  122. </ELECTION>
  123. <ELECTION>
  124.     <title1>Henry County Board Dist. 2</title1>
  125.     <PrecintPercent>100</PrecintPercent>
  126.     <Winner>5219</Winner>
  127.     <WinningVotes>3102</WinningVotes>
  128.     <WinningParty>D</WinningParty>
  129.     <Winner>SammieBorst</Winner>
  130.     <WinnerSelected>0</WinnerSelected>
  131.     <PrecintPercent>100</PrecintPercent>
  132.     <Loser>5224</Loser>
  133.     <LosingVotes>3003</LosingVotes>
  134.     <LosingParty>R</LosingParty>
  135.     <Loser>DonaldDedobbelaere</Loser>
  136.     <LoserSelected>0</LoserSelected>
  137. </ELECTION>
  138. <ELECTION>
  139.     <title1>Henry County Board Dist. 2</title1>
  140.     <PrecintPercent>100</PrecintPercent>
  141.     <Winner>5374</Winner>
  142.     <WinningVotes>0</WinningVotes>
  143.     <WinningParty>D</WinningParty>
  144.     <Winner>JamesKursock</Winner>
  145.     <WinnerSelected>1</WinnerSelected>
  146.     <PrecintPercent>100</PrecintPercent>
  147.     <Loser>5375</Loser>
  148.     <LosingVotes>0</LosingVotes>
  149.     <LosingParty>D</LosingParty>
  150.     <Loser>JerryThompson</Loser>
  151.     <LoserSelected>1</LoserSelected>
  152.   </ELECTION>
Does anyone think this is possible? I willing to do anything to get this to work. I am not concerned about performance, just as long as the query/xml creating can be done within 60 seconds. It is with great anxiety, I await anyones response. Thank You
Feb 24 '14 #1
0 1014

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3827
by: Dr John Stockton | last post by:
What are the best ways of returning multiple results from a subroutine ? I've been using ... return } which is inelegant. I'm used to Pascal's procedure X(const A, B : integer; var C, D :...
2
1864
by: Ringo Langly | last post by:
Hi all, I need to put multiple results in one field, but not sure how. Here's some sample code: select a.name, a.accountnum, a.ordernum, (select itemid from items where items_ordernum =...
1
19688
by: fernan | last post by:
Hi I don't know how to build a query which access to multiple databases. Example: On the same server I have DB1 and DB2 I want to SELECT TABLE FROM DB1 INTO CURSOR AND THEN I WANT TO MODIFY A...
1
2836
by: Barb.Richards | last post by:
I have created an append query that pulls information from one database, and will append the selected information into a new table. The fields are setup like 'number' 'category' 'code' 'shares' and...
1
2580
by: bobby44 | last post by:
Hi, I hope someone can help with a query I'm stuck on. I think it will involve inner join but I can't get my head around it. I have two tables that relate to venues fr weddings: --...
4
6404
Plater
by: Plater | last post by:
Ok so currently I have a store procedure that does roughly this: SELECT IDX, FirstName, LastName, Email, Phone, etc, etc2, etc3 FROM ABunchOfTables WHERE ALotOfLogic=true
2
1351
by: Neosword | last post by:
Hi I have a problem with a WHERE clause, I have to compare a column value to a query that returns multiple results, I also tried to substitute the "=" for "IN" but didn't worked. Any help would be...
7
3121
by: seegoon | last post by:
Hi guys. I'm trying to write some php so that, depending on the page displayed, a certain <div> will load a certain class, giving it a certain background image. I have it down in theory, but...
6
3215
MusoFreak200
by: MusoFreak200 | last post by:
how do you reference to a external .html file to place it into multiple pages? just the same as .css files?
4
1208
by: Brad Galinson | last post by:
I have a long sql query that, among other things, accesses multiple tables with an inner join and some left outer joins. I am expecting it to give a single set of results but when it finds more than...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.