XPath veri türleri için (SQLXML 4.0) XSD veri türlerini eşleştirme
XPath sorgusu gerçekleştirildiğinde karşı bir XSD şeması ve XSD türü belirtilen xsd:type öznitelik, XPath sorgu işlerken belirtilen veri türü kullanır.
XPath veri türü bir düğümün, şemadaki XSD veri türü aşağıdaki tabloda gösterildiği gibi türetilir.(ÇalışanNo düğüm gösterim amacıyla kullanılır.)
XSD veri türü |
XDR veri türü |
Eşdeğeri XPath veri türü |
SQL Server kullanılan dönüştürme |
---|---|---|---|
Base64Binary HexBinary |
None bin.base64bin.hex |
Not applicable |
None ÇalışanNo |
Boolean |
boolean |
boolean |
CONVERT (bit, ÇalışanNo) |
Decimal, integer, float, byte, short, int, long, float, double, unsignedByte, unsignedShort, unsignedInt, unsignedLong |
number, int, float,i1, i2, i4, i8,r4, r8ui1, ui2, ui4, ui8 |
number |
CONVERT(float(53), ÇalışanNo) |
id, idref, idrefsentity, entities, notation, nmtoken, nmtokens, DateTime, string, AnyURI |
id, idref, idrefsentity, entities, enumeration, notation, nmtoken, nmtokens, char, dateTime, dateTime.tz, string, uri, uuid |
string |
CONVERT(nvarchar(4000), ÇalışanNo, 126) |
decimal |
fixed14.4 |
Not applicable (There is no data type in XPath that is equivalent to the fixed14.4 XDR data type.) |
CONVERT (para, ÇalışanNo) |
date |
date |
string |
LEFT(CONVERT(nvarchar(4000), EmployeeID, 126), 10) |
time |
time time.tz |
string |
SUBSTRING(CONVERT(nvarchar(4000), EmployeeID, 126), 1 + CHARINDEX(N'T', CONVERT(nvarchar(4000), EmployeeID, 126)), 24) |