Skip to content

Commit

Permalink
Update Get-DbaHelpIndex.ps1
Browse files Browse the repository at this point in the history
fixed issue dataplat#9447
  • Loading branch information
jianjunpei committed Sep 15, 2024
1 parent 4994128 commit f9fa42f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/Get-DbaHelpIndex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function Get-DbaHelpIndex {
name AS IndexName ,
STUFF((SELECT N', ' + ColumnName
FROM cteIndex ci2
WHERE ci2.name = ci.name
WHERE ci2.name = ci.name AND ci2.object_id=ci.object_id
AND ci2.is_included_column = 0
GROUP BY ci2.index_column_id ,
ci2.ColumnName
Expand All @@ -414,7 +414,7 @@ function Get-DbaHelpIndex {
2, N'') AS KeyColumns ,
ISNULL(STUFF((SELECT N', ' + ColumnName
FROM cteIndex ci3
WHERE ci3.name = ci.name
WHERE ci3.name = ci.name AND ci3.object_id=ci.object_id
AND ci3.is_included_column = 1
GROUP BY ci3.index_column_id ,
ci3.ColumnName
Expand Down Expand Up @@ -801,7 +801,7 @@ function Get-DbaHelpIndex {
name AS IndexName ,
STUFF((SELECT N', ' + ColumnName
FROM cteIndex ci2
WHERE ci2.name = ci.name
WHERE ci2.name = ci.name and ci2.object_id=ci.object_id
AND ci2.is_included_column = 0
GROUP BY ci2.index_column_id ,
ci2.ColumnName
Expand All @@ -811,7 +811,7 @@ function Get-DbaHelpIndex {
2, N'') AS KeyColumns ,
ISNULL(STUFF((SELECT N', ' + ColumnName
FROM cteIndex ci3
WHERE ci3.name = ci.name
WHERE ci3.name = ci.name and ci3.object_id=ci.object_id
AND ci3.is_included_column = 1
GROUP BY ci3.index_column_id ,
ci3.ColumnName
Expand Down

0 comments on commit f9fa42f

Please sign in to comment.