XSD 데이터 형식을 XPath 데이터 형식에 매핑(SQLXML 4.0)

XSD 스키마에 대해 XPath 쿼리를 실행할 경우 XSD 형식이 xsd:type 특성에 지정되어 있으면 XPath는 쿼리를 처리할 때 지정된 데이터 형식을 사용합니다.

다음 표에서 볼 수 있는 것처럼 노드의 XPath 데이터 형식은 스키마의 XSD 데이터 형식에서 파생됩니다. EmployeeID 노드는 설명을 위해 사용되었습니다.

XSD 데이터 형식

XDR 데이터 형식

해당

XPath 데이터 형식

SQL Server

변환

Base64Binary

HexBinary

None

bin.base64bin.hex

Not applicable

없음

EmployeeID

Boolean

boolean

boolean

CONVERT(bit, EmployeeID)

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), EmployeeID)

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), EmployeeID, 126)

decimal

fixed14.4

해당 사항 없음(XPath에는 fixed14.4 XDR 데이터 형식에 해당하는 데이터 형식이 없음)

CONVERT(money, EmployeeID)

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)