Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 1a8aaed

Browse files
authored
Merge pull request #10957 from MicrosoftDocs/MashaMSFT-patch-1
fixing code block
2 parents 29fc3fd + 3bd1f47 commit 1a8aaed

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

docs/relational-databases/tables/lesson-1-converting-a-table-to-a-hierarchical-structure.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)