1
General Board / HierarchyID SQL Server 2008 data type DDL issue
« on: April 29, 2010, 08:42:55 am »
The new SQL Hierarchy data type in SQL 2008 is pretty cool but I have yet to discover how to set up an EA Table attribute to allow me to model the Hierarchy level, the node works since it is a datatype but the Level is a computed column.
Here is an example Create Table sql statement and the issue is how can I get EA to create the "lvl" attribute which is computed off the HierarchyID column im my DDL output?
If anyone is interested in this new datatype, have a look at http://blogs.technet.com/andrew/pages/sql-server-2008-hierarchy-id-data-type.aspx for a good example.
Here is an example Create Table sql statement and the issue is how can I get EA to create the "lvl" attribute which is computed off the HierarchyID column im my DDL output?
Code: [Select]
CREATE TABLE dbo.Employees
(
empid INT NOT NULL,
hid HIERARCHYID NOT NULL,
lvl AS hid.GetLevel() PERSISTED
empname VARCHAR(25) NOT NULL,
salary MONEY NOT NULL
)
Any help is much appreciated. If anyone is interested in this new datatype, have a look at http://blogs.technet.com/andrew/pages/sql-server-2008-hierarchy-id-data-type.aspx for a good example.