Skip to content

Commit 8f4c850

Browse files
author
Azure Pipelines Bot
committed
[Windows / SQL Server EXTRAS] baselines
1 parent 362d3ca commit 8f4c850

File tree

32 files changed

+1696
-832
lines changed

32 files changed

+1696
-832
lines changed

SqlServer.Contained.LinqService/Tests/UserTests/Issue3148Tests/Tests.UserTests.Issue3148Tests.TestDefaultExpression_08(SqlServer.Contained.LinqService,False).sql

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,37 @@ FROM
99
LEFT JOIN [Parent] [a_Parent] ON [x].[ParentID] = [a_Parent].[ParentID]
1010
OUTER APPLY (
1111
SELECT TOP (1)
12-
[a_Parent_1].[ParentID],
13-
[a_Parent_1].[Value1]
12+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], NULL) as [ParentID],
13+
IIF([d].[not_null] IS NOT NULL, [d].[Value1], NULL) as [Value1]
1414
FROM
15-
[GrandChild] [a_GrandChildren]
16-
LEFT JOIN [Child] [a_Child] ON [a_GrandChildren].[ParentID] = [a_Child].[ParentID] AND [a_GrandChildren].[ChildID] = [a_Child].[ChildID]
17-
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
18-
WHERE
19-
[x].[ParentID] = [a_GrandChildren].[ParentID] AND [x].[ChildID] = [a_GrandChildren].[ChildID]
20-
) [t1]
15+
(
16+
SELECT
17+
1 as [c1]
18+
) [t1]
19+
LEFT JOIN (
20+
SELECT
21+
1 as [not_null],
22+
[a_Parent_1].[ParentID],
23+
[a_Parent_1].[Value1]
24+
FROM
25+
[GrandChild] [e]
26+
LEFT JOIN [Child] [a_Child] ON [e].[ParentID] = [a_Child].[ParentID] AND [e].[ChildID] = [a_Child].[ChildID]
27+
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
28+
WHERE
29+
[x].[ParentID] = [e].[ParentID] AND [x].[ChildID] = [e].[ChildID]
30+
) [d] ON 1=1
31+
) [t2]
2132
WHERE
22-
NOT (([a_Parent].[ParentID] = [t1].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t1].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t1].[Value1] OR [a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t1].[Value1] IS NULL)) AND
33+
NOT (([a_Parent].[ParentID] = [t2].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t2].[Value1] OR [a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t2].[Value1] IS NULL)) AND
2334
IIF([x].[ParentID] = (
2435
SELECT TOP (1)
25-
[a_Children].[ChildID]
36+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
2637
FROM
27-
[Child] [a_Children]
28-
WHERE
29-
[a_Parent].[ParentID] = [a_Children].[ParentID]
38+
(
39+
SELECT
40+
1 as [c1]
41+
) [t3]
42+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
3043
), 0, 1) = 1
3144

3245
BeforeExecute
@@ -40,23 +53,36 @@ FROM
4053
LEFT JOIN [Parent] [a_Parent] ON [x].[ParentID] = [a_Parent].[ParentID]
4154
OUTER APPLY (
4255
SELECT TOP (1)
43-
[a_Parent_1].[ParentID],
44-
[a_Parent_1].[Value1]
56+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], NULL) as [ParentID],
57+
IIF([d].[not_null] IS NOT NULL, [d].[Value1], NULL) as [Value1]
4558
FROM
46-
[GrandChild] [a_GrandChildren]
47-
LEFT JOIN [Child] [a_Child] ON [a_GrandChildren].[ParentID] = [a_Child].[ParentID] AND [a_GrandChildren].[ChildID] = [a_Child].[ChildID]
48-
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
49-
WHERE
50-
[x].[ParentID] = [a_GrandChildren].[ParentID] AND [x].[ChildID] = [a_GrandChildren].[ChildID]
51-
) [t1]
59+
(
60+
SELECT
61+
1 as [c1]
62+
) [t1]
63+
LEFT JOIN (
64+
SELECT
65+
1 as [not_null],
66+
[a_Parent_1].[ParentID],
67+
[a_Parent_1].[Value1]
68+
FROM
69+
[GrandChild] [e]
70+
LEFT JOIN [Child] [a_Child] ON [e].[ParentID] = [a_Child].[ParentID] AND [e].[ChildID] = [a_Child].[ChildID]
71+
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
72+
WHERE
73+
[x].[ParentID] = [e].[ParentID] AND [x].[ChildID] = [e].[ChildID]
74+
) [d] ON 1=1
75+
) [t2]
5276
WHERE
53-
NOT (([a_Parent].[ParentID] = [t1].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t1].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t1].[Value1] OR [a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t1].[Value1] IS NULL)) AND
77+
NOT (([a_Parent].[ParentID] = [t2].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t2].[Value1] OR [a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t2].[Value1] IS NULL)) AND
5478
IIF([x].[ParentID] = (
5579
SELECT TOP (1)
56-
[a_Children].[ChildID]
80+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
5781
FROM
58-
[Child] [a_Children]
59-
WHERE
60-
[a_Parent].[ParentID] = [a_Children].[ParentID]
82+
(
83+
SELECT
84+
1 as [c1]
85+
) [t3]
86+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
6187
), 0, 1) = 1
6288

SqlServer.Contained.LinqService/Tests/UserTests/Issue3148Tests/Tests.UserTests.Issue3148Tests.TestDefaultExpression_08(SqlServer.Contained.LinqService,True).sql

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,37 @@ FROM
99
LEFT JOIN [Parent] [a_Parent] ON [x].[ParentID] = [a_Parent].[ParentID]
1010
OUTER APPLY (
1111
SELECT TOP (1)
12-
[a_Parent_1].[ParentID],
13-
[a_Parent_1].[Value1]
12+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], 0) as [ParentID],
13+
IIF([d].[not_null] IS NOT NULL, [d].[Value1], NULL) as [Value1]
1414
FROM
15-
[GrandChild] [a_GrandChildren]
16-
LEFT JOIN [Child] [a_Child] ON [a_GrandChildren].[ParentID] = [a_Child].[ParentID] AND [a_GrandChildren].[ChildID] = [a_Child].[ChildID]
17-
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
18-
WHERE
19-
[x].[ParentID] = [a_GrandChildren].[ParentID] AND [x].[ChildID] = [a_GrandChildren].[ChildID]
20-
) [t1]
15+
(
16+
SELECT
17+
1 as [c1]
18+
) [t1]
19+
LEFT JOIN (
20+
SELECT
21+
1 as [not_null],
22+
[a_Parent_1].[ParentID],
23+
[a_Parent_1].[Value1]
24+
FROM
25+
[GrandChild] [e]
26+
LEFT JOIN [Child] [a_Child] ON [e].[ParentID] = [a_Child].[ParentID] AND [e].[ChildID] = [a_Child].[ChildID]
27+
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
28+
WHERE
29+
[x].[ParentID] = [e].[ParentID] AND [x].[ChildID] = [e].[ChildID]
30+
) [d] ON 1=1
31+
) [t2]
2132
WHERE
22-
NOT (([a_Parent].[ParentID] = [t1].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t1].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t1].[Value1] OR [a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t1].[Value1] IS NULL)) AND
33+
NOT (([a_Parent].[ParentID] = [t2].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t2].[Value1] OR [a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t2].[Value1] IS NULL)) AND
2334
IIF([x].[ParentID] = (
2435
SELECT TOP (1)
25-
[a_Children].[ChildID]
36+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
2637
FROM
27-
[Child] [a_Children]
28-
WHERE
29-
[a_Parent].[ParentID] = [a_Children].[ParentID]
38+
(
39+
SELECT
40+
1 as [c1]
41+
) [t3]
42+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
3043
), 0, 1) = 1
3144

3245
BeforeExecute
@@ -40,23 +53,36 @@ FROM
4053
LEFT JOIN [Parent] [a_Parent] ON [x].[ParentID] = [a_Parent].[ParentID]
4154
OUTER APPLY (
4255
SELECT TOP (1)
43-
[a_Parent_1].[ParentID],
44-
[a_Parent_1].[Value1]
56+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], 0) as [ParentID],
57+
IIF([d].[not_null] IS NOT NULL, [d].[Value1], NULL) as [Value1]
4558
FROM
46-
[GrandChild] [a_GrandChildren]
47-
LEFT JOIN [Child] [a_Child] ON [a_GrandChildren].[ParentID] = [a_Child].[ParentID] AND [a_GrandChildren].[ChildID] = [a_Child].[ChildID]
48-
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
49-
WHERE
50-
[x].[ParentID] = [a_GrandChildren].[ParentID] AND [x].[ChildID] = [a_GrandChildren].[ChildID]
51-
) [t1]
59+
(
60+
SELECT
61+
1 as [c1]
62+
) [t1]
63+
LEFT JOIN (
64+
SELECT
65+
1 as [not_null],
66+
[a_Parent_1].[ParentID],
67+
[a_Parent_1].[Value1]
68+
FROM
69+
[GrandChild] [e]
70+
LEFT JOIN [Child] [a_Child] ON [e].[ParentID] = [a_Child].[ParentID] AND [e].[ChildID] = [a_Child].[ChildID]
71+
LEFT JOIN [Parent] [a_Parent_1] ON [a_Child].[ParentID] = [a_Parent_1].[ParentID]
72+
WHERE
73+
[x].[ParentID] = [e].[ParentID] AND [x].[ChildID] = [e].[ChildID]
74+
) [d] ON 1=1
75+
) [t2]
5276
WHERE
53-
NOT (([a_Parent].[ParentID] = [t1].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t1].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t1].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t1].[Value1] OR [a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t1].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t1].[Value1] IS NULL)) AND
77+
NOT (([a_Parent].[ParentID] = [t2].[ParentID] OR [a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([a_Parent].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([a_Parent].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([a_Parent].[Value1] = [t2].[Value1] OR [a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NULL) AND NOT ([a_Parent].[Value1] IS NULL AND [t2].[Value1] IS NOT NULL) AND NOT ([a_Parent].[Value1] IS NOT NULL AND [t2].[Value1] IS NULL)) AND
5478
IIF([x].[ParentID] = (
5579
SELECT TOP (1)
56-
[a_Children].[ChildID]
80+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
5781
FROM
58-
[Child] [a_Children]
59-
WHERE
60-
[a_Parent].[ParentID] = [a_Children].[ParentID]
82+
(
83+
SELECT
84+
1 as [c1]
85+
) [t3]
86+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
6187
), 0, 1) = 1
6288

SqlServer.Contained.LinqService/Tests/UserTests/Issue3148Tests/Tests.UserTests.Issue3148Tests.TestDefaultExpression_09(SqlServer.Contained.LinqService,False).sql

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,38 @@ FROM
1919
) [t1]
2020
OUTER APPLY (
2121
SELECT TOP (1)
22-
[a_GrandChildren_1].[ParentID],
23-
[a_GrandChildren_1].[ChildID],
24-
[a_GrandChildren_1].[GrandChildID]
22+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], NULL) as [ParentID],
23+
IIF([d].[not_null] IS NOT NULL, [d].[ChildID], NULL) as [ChildID],
24+
IIF([d].[not_null] IS NOT NULL, [d].[GrandChildID], NULL) as [GrandChildID]
2525
FROM
26-
[GrandChild] [a_GrandChildren_1]
27-
WHERE
28-
[x].[ParentID] = [a_GrandChildren_1].[ParentID] AND
29-
[x].[ChildID] = [a_GrandChildren_1].[ChildID]
30-
) [t2]
26+
(
27+
SELECT
28+
1 as [c1]
29+
) [t2]
30+
LEFT JOIN (
31+
SELECT
32+
1 as [not_null],
33+
[a_GrandChildren_1].[ParentID],
34+
[a_GrandChildren_1].[ChildID],
35+
[a_GrandChildren_1].[GrandChildID]
36+
FROM
37+
[GrandChild] [a_GrandChildren_1]
38+
WHERE
39+
[x].[ParentID] = [a_GrandChildren_1].[ParentID] AND
40+
[x].[ChildID] = [a_GrandChildren_1].[ChildID]
41+
) [d] ON 1=1
42+
) [t3]
3143
WHERE
32-
NOT (([t1].[ParentID] = [t2].[ParentID] OR [t1].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([t1].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([t1].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([t1].[ChildID] = [t2].[ChildID] OR [t1].[ChildID] IS NULL AND [t2].[ChildID] IS NULL) AND NOT ([t1].[ChildID] IS NULL AND [t2].[ChildID] IS NOT NULL) AND NOT ([t1].[ChildID] IS NOT NULL AND [t2].[ChildID] IS NULL) AND ([t1].[GrandChildID] = [t2].[GrandChildID] OR [t1].[GrandChildID] IS NULL AND [t2].[GrandChildID] IS NULL) AND NOT ([t1].[GrandChildID] IS NULL AND [t2].[GrandChildID] IS NOT NULL) AND NOT ([t1].[GrandChildID] IS NOT NULL AND [t2].[GrandChildID] IS NULL)) AND
44+
NOT (([t1].[ParentID] = [t3].[ParentID] OR [t1].[ParentID] IS NULL AND [t3].[ParentID] IS NULL) AND NOT ([t1].[ParentID] IS NULL AND [t3].[ParentID] IS NOT NULL) AND NOT ([t1].[ParentID] IS NOT NULL AND [t3].[ParentID] IS NULL) AND ([t1].[ChildID] = [t3].[ChildID] OR [t1].[ChildID] IS NULL AND [t3].[ChildID] IS NULL) AND NOT ([t1].[ChildID] IS NULL AND [t3].[ChildID] IS NOT NULL) AND NOT ([t1].[ChildID] IS NOT NULL AND [t3].[ChildID] IS NULL) AND ([t1].[GrandChildID] = [t3].[GrandChildID] OR [t1].[GrandChildID] IS NULL AND [t3].[GrandChildID] IS NULL) AND NOT ([t1].[GrandChildID] IS NULL AND [t3].[GrandChildID] IS NOT NULL) AND NOT ([t1].[GrandChildID] IS NOT NULL AND [t3].[GrandChildID] IS NULL)) AND
3345
IIF([x].[ParentID] = (
3446
SELECT TOP (1)
35-
[a_Children].[ChildID]
47+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
3648
FROM
37-
[Child] [a_Children]
38-
WHERE
39-
[a_Parent].[ParentID] = [a_Children].[ParentID]
49+
(
50+
SELECT
51+
1 as [c1]
52+
) [t4]
53+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
4054
), 0, 1) = 1
4155

4256
BeforeExecute
@@ -60,23 +74,37 @@ FROM
6074
) [t1]
6175
OUTER APPLY (
6276
SELECT TOP (1)
63-
[a_GrandChildren_1].[ParentID],
64-
[a_GrandChildren_1].[ChildID],
65-
[a_GrandChildren_1].[GrandChildID]
77+
IIF([d].[not_null] IS NOT NULL, [d].[ParentID], NULL) as [ParentID],
78+
IIF([d].[not_null] IS NOT NULL, [d].[ChildID], NULL) as [ChildID],
79+
IIF([d].[not_null] IS NOT NULL, [d].[GrandChildID], NULL) as [GrandChildID]
6680
FROM
67-
[GrandChild] [a_GrandChildren_1]
68-
WHERE
69-
[x].[ParentID] = [a_GrandChildren_1].[ParentID] AND
70-
[x].[ChildID] = [a_GrandChildren_1].[ChildID]
71-
) [t2]
81+
(
82+
SELECT
83+
1 as [c1]
84+
) [t2]
85+
LEFT JOIN (
86+
SELECT
87+
1 as [not_null],
88+
[a_GrandChildren_1].[ParentID],
89+
[a_GrandChildren_1].[ChildID],
90+
[a_GrandChildren_1].[GrandChildID]
91+
FROM
92+
[GrandChild] [a_GrandChildren_1]
93+
WHERE
94+
[x].[ParentID] = [a_GrandChildren_1].[ParentID] AND
95+
[x].[ChildID] = [a_GrandChildren_1].[ChildID]
96+
) [d] ON 1=1
97+
) [t3]
7298
WHERE
73-
NOT (([t1].[ParentID] = [t2].[ParentID] OR [t1].[ParentID] IS NULL AND [t2].[ParentID] IS NULL) AND NOT ([t1].[ParentID] IS NULL AND [t2].[ParentID] IS NOT NULL) AND NOT ([t1].[ParentID] IS NOT NULL AND [t2].[ParentID] IS NULL) AND ([t1].[ChildID] = [t2].[ChildID] OR [t1].[ChildID] IS NULL AND [t2].[ChildID] IS NULL) AND NOT ([t1].[ChildID] IS NULL AND [t2].[ChildID] IS NOT NULL) AND NOT ([t1].[ChildID] IS NOT NULL AND [t2].[ChildID] IS NULL) AND ([t1].[GrandChildID] = [t2].[GrandChildID] OR [t1].[GrandChildID] IS NULL AND [t2].[GrandChildID] IS NULL) AND NOT ([t1].[GrandChildID] IS NULL AND [t2].[GrandChildID] IS NOT NULL) AND NOT ([t1].[GrandChildID] IS NOT NULL AND [t2].[GrandChildID] IS NULL)) AND
99+
NOT (([t1].[ParentID] = [t3].[ParentID] OR [t1].[ParentID] IS NULL AND [t3].[ParentID] IS NULL) AND NOT ([t1].[ParentID] IS NULL AND [t3].[ParentID] IS NOT NULL) AND NOT ([t1].[ParentID] IS NOT NULL AND [t3].[ParentID] IS NULL) AND ([t1].[ChildID] = [t3].[ChildID] OR [t1].[ChildID] IS NULL AND [t3].[ChildID] IS NULL) AND NOT ([t1].[ChildID] IS NULL AND [t3].[ChildID] IS NOT NULL) AND NOT ([t1].[ChildID] IS NOT NULL AND [t3].[ChildID] IS NULL) AND ([t1].[GrandChildID] = [t3].[GrandChildID] OR [t1].[GrandChildID] IS NULL AND [t3].[GrandChildID] IS NULL) AND NOT ([t1].[GrandChildID] IS NULL AND [t3].[GrandChildID] IS NOT NULL) AND NOT ([t1].[GrandChildID] IS NOT NULL AND [t3].[GrandChildID] IS NULL)) AND
74100
IIF([x].[ParentID] = (
75101
SELECT TOP (1)
76-
[a_Children].[ChildID]
102+
IIF([d_1].[ChildID] IS NOT NULL, [d_1].[ChildID], 0)
77103
FROM
78-
[Child] [a_Children]
79-
WHERE
80-
[a_Parent].[ParentID] = [a_Children].[ParentID]
104+
(
105+
SELECT
106+
1 as [c1]
107+
) [t4]
108+
LEFT JOIN [Child] [d_1] ON [a_Parent].[ParentID] = [d_1].[ParentID]
81109
), 0, 1) = 1
82110

0 commit comments

Comments
 (0)