Results for “CMD”
Small, practical examples. Search by task or narrow things down below.
Select values in an inclusive range
SQL Server: BETWEEN includes both endpoints of the range.
SQL Server✓ Tested
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Serialize query rows as JSON
Return a JSON array directly from a SELECT.
FOR JSON✓ Tested
Show a group total beside each detail row
SQL Server: A partitioned aggregate preserves detail rows instead of collapsing them with GROUP BY.
SQL Server✓ Tested
Sort a sequence of numbers
PowerShell: Sort a sequence of numbers using PowerShell 7.
PowerShell✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sort preferred rows ahead of other rows
SQL Server: A CASE ordering key expresses business priority before a stable secondary sort.
SQL Server✓ Tested
Sort the highest quantities first
SQL Server: Specify descending order and a stable tie breaker.
SQL Server✓ Tested
Split an array into fixed-size batches
PowerShell: Bound the final index so the last batch can contain fewer elements.
PowerShell✓ Tested
Split delimited text with positions
Retain original order with STRING_SPLIT ordinals.
STRING_SPLIT✓ Tested
Split simple delimited text
PowerShell: Split simple delimited text using PowerShell 7.
PowerShell✓ Tested