TechNet
Export (0) Print
Expand All

Values for <xsd:simpleType> Declarations

 

Applies To: SQL Server 2016

The following table outlines the restrictions that are applied, based on all recognized XSD simple type enumerations.

Also, SQL Server does not support the NaN value in <xsd:simpleType> declarations. Schemas that include NaN values are rejected by the server.

Simple typeLimitation
durationThe year part has to be within the range of -2^31 to 2^31-1. The month, day, hour, minute, and second must all be within the range of 0 to 9999. The seconds part has an additional three digits of precision to the right of the decimal point.
dateTimeThe hour part in the time zone subfield must be within the accepted range of -14 to +14. The year part must be within the range of 1 to 9999. The month part must be within the range of 1 to 12. The day part must be within the range of 1 to 31 and must be a valid calendar date. For example, SQL Server detects and returns an error for an invalid date, such as 1974-02-31, because the month of February does not have 31 days.

The second component supports 100-nanosecond precision. The timezone indication is optional.

SQL Server 2005 supported years in the range -9999 to 9999. SQL Server now supports a more restricted range of years. For more information, see Compare Typed XML to Untyped XML.
dateThe year part must be within the range of 1 to 9999. The month part must be within the range of 1 to 12. The day part must be within the range of 1 to 31 and must be a valid calendar date. For example, SQL Server detects and returns an error for an invalid date, such as 1974-02-31, because the month of February does not have 31 days.

SQL Server 2005 supported years in the range -9999 to 9999. SQL Server now supports a more restricted range of years. For more information, see Compare Typed XML to Untyped XML.
gYearMonthThe year part must be within the range of -9999 to 9999.
gYearThe year part must be within the range of -9999 to 9999.
gMonthDayThe month part must be within the range of 1 to 12. The day part must be within the range of 1 to 31.
gDayThe day part must be within the range of 1 to 31
gMonthThe month part must be within the range of 1 to 12.
decimalValues of this type must comply with the format of the SQL numeric type. This type internally represents the support of numbers up to a total of 38 digits, with 10 of those digit positions reserved for fractional precision.
floatValues of this type must comply with the format of the SQL real type.
doubleValues of this type must comply with the format of the SQL float type.
stringValues of this type must comply with the format of the SQL nvarchar(max) type.
anyURIValues of this type can be no more than 4000 Unicode characters in length.

Requirements and Limitations for XML Schema Collections on the Server

Community Additions

ADD
Show:
© 2016 Microsoft