-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed INSERT test with hyerachical CTE.
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...CSQLQueryExpress.Tests/UnitTests/InsertStatements/TestInsertFromHyerarchicalSelectCte.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
WITH _t0 AS | ||
( | ||
SELECT | ||
_t0.[CompanyName], | ||
@p0 AS [Phone] | ||
FROM [dbo].[Customers] AS _t0 | ||
), | ||
_t1 AS | ||
( | ||
SELECT | ||
_t1.* | ||
FROM [dbo].[Suppliers] AS _t1 | ||
INNER JOIN _t0 ON (_t1.[CompanyName] = _t0.[CompanyName]) | ||
), | ||
_t2 AS | ||
( | ||
SELECT | ||
_t2.* | ||
FROM [dbo].[Shippers] AS _t2 | ||
INNER JOIN _t0 ON (_t2.[CompanyName] = _t0.[CompanyName]) | ||
) | ||
|
||
INSERT INTO [dbo].[Shippers] | ||
([CompanyName], [Phone]) | ||
SELECT | ||
_t2.* | ||
FROM _t0 | ||
INNER JOIN _t1 ON (_t0.[CompanyName] = _t1.[CompanyName]) | ||
INNER JOIN _t2 ON (_t2.[CompanyName] = _t1.[CompanyName]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters