Write (Database Engine)
THIS TOPIC APPLIES TO: SQL Server (starting with 2008) Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse
Write writes out a binary representation of SqlHierarchyId to the passed-in BinaryWriter. Write cannot be called by using Transact-SQL. Use CAST or CONVERT instead.
A BinaryWriter object to which the binary representation of this hierarchyid node will be written out.
CLR return type: void
Write is used internally by SQL Server when it is necessary, such as when loading data from a hierarchyid column. Write is also called internally when a conversion is done between hierarchyid and varbinary.