Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ To work around this issue, follow these steps:
```sql
SELECT TOP 3 A.c1, A.c2
FROM sys.partitions AS P
CROSS APPLY ( SELECT TOP 3 T1.c1, T2.c2)
FROM dbo.T1
WHERE $PARTITION.PF1(T1.col1) = P.partition_number
ORDER BY T1.c1 ) AS A
WHERE P.object_id = OBJECT_ID('dbo.T1')
AND P.index_id = INDEXPROPERTY( OBJECTID('dbo.T1'), 'idx_c1', 'INDEXID')
ORDER BY a;
CROSS APPLY
(
SELECT TOP 3 T1.c1, T2.c2
FROM dbo.T1
WHERE $PARTITION.PF1(T1.col1) = P.partition_number
ORDER BY T1.c1
) AS A
WHERE P.object_id = OBJECT_ID('dbo.T1')
AND P.index_id = INDEXPROPERTY(OBJECT_ID('dbo.T1'), 'idx_c1', 'INDEXID')
ORDER BY a.T1;
```

> [!NOTE]
Expand Down