Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why I have an incomplete information XML???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I don't understand, why I input the following SQL statement have an incompleted result(XML)?
Some records are missing(My database don't have NULL value)
* element loginame and accright data missing!!!
Thank you for give me some tips.

SQL Statement:
Select 1 as Tag, 0 as Parent,
accessctrl.accno as [accessctrl!1!accno!xml],
accessctrl.loginame as [accessctrl!1!loginame!xml],
accessctrl.passwd as [accessctrl!1!passwd!xml],
accessctrl.accright as [accessctrl!1!accright!xml]
from accessctrl FOR XML EXPLICIT, XMLDATA;

Result:
<Schema name=&quot;Schema1&quot; xmlns=&quot;urn:schemas-microsoft-com:xml-data&quot; xmlns:dt=&quot;urn:schemas-microsoft-com:datatypes&quot;>
<ElementType name=&quot;accessctrl&quot; content=&quot;mixed&quot; model=&quot;open&quot;>
<element type=&quot;accno&quot; />
<element type=&quot;loginame&quot; />
<element type=&quot;passwd&quot; />
<element type=&quot;accright&quot; />
</ElementType>
<ElementType name=&quot;accno&quot; content=&quot;mixed&quot; model=&quot;closed&quot; dt:type=&quot;i4&quot; />
<ElementType name=&quot;loginame&quot; content=&quot;mixed&quot; model=&quot;closed&quot; dt:type=&quot;string&quot; />
<ElementType name=&quot;passwd&quot; content=&quot;mixed&quot; model=&quot;closed&quot; dt:type=&quot;string&quot; />
<ElementType name=&quot;accright&quot; content=&quot;mixed&quot; model=&quot;closed&quot; dt:type=&quot;i4&quot; />
</Schema>
<accno>1</accno>
<passwd>victor</passwd>
<accno>2</accno>
<passwd>tony</passwd>
<accno>3</accno>
<passwd>cat</passwd>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top