@@ -39,21 +39,22 @@ The sample Adventureworks2017 (or later) database contains an **Employee** table
3939
4040[ !INCLUDE[ freshInclude] ( ../../includes/paragraph-content/fresh-note-steps-feedback.md )]
4141
42- ```sql
43- USE AdventureWorks2017;
44- GO
45- if OBJECT_ID('HumanResources.EmployeeDemo') is not null
46- drop table HumanResources.EmployeeDemo
42+
43+ ``` sql
44+ USE AdventureWorks2017;
45+ GO
46+ if OBJECT_ID(' HumanResources.EmployeeDemo' ) is not null
47+ drop table HumanResources .EmployeeDemo
4748
4849 SELECT emp .BusinessEntityID AS EmployeeID, emp .LoginID ,
49- (SELECT man.BusinessEntityID FROM HumanResources.Employee man
50- WHERE emp.OrganizationNode.GetAncestor(1)=man.OrganizationNode OR
51- (emp.OrganizationNode.GetAncestor(1) = 0x AND man.OrganizationNode IS NULL)) AS ManagerID,
52- emp.JobTitle, emp.HireDate
53- INTO HumanResources.EmployeeDemo
54- FROM HumanResources.Employee emp ;
55- GO
56- ```
50+ (SELECT man .BusinessEntityID FROM HumanResources .Employee man
51+ WHERE emp .OrganizationNode .GetAncestor(1 )= man .OrganizationNode OR
52+ (emp .OrganizationNode .GetAncestor(1 ) = 0x AND man .OrganizationNode IS NULL )) AS ManagerID,
53+ emp .JobTitle , emp .HireDate
54+ INTO HumanResources .EmployeeDemo
55+ FROM HumanResources .Employee emp ;
56+ GO
57+ ```
5758
5859### Examine the structure and data of the EmployeeDemo table
5960
0 commit comments