Results for “table variable”
Small, practical examples. Search by task or narrow things down below.
Compute an integer weighted average
SQL: Multiply before summing and guard a zero total weight with NULLIF.
SQL✓ Tested
Compute beyond the fixed-width integer range
PowerShell: BigInteger keeps an exact result when ordinary integer types are too small.
PowerShell✓ Tested
Confirm the root filesystem rejects writes
Docker / Compose: A read-only root prevents creating files outside writable mounts.
Docker / Compose✓ Tested
Convert a string to lowercase
Normalize a text value using Bash expansion.
lowercase✓ Tested
Convert between hexadecimal text and bytes
PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.
PowerShell✓ Tested
Convert text without raising a conversion error
Return NULL when a numeric conversion fails.
TRY_CONVERT✓ Tested
Convert Unix seconds into an aware UTC timestamp
PowerShell: DateTimeOffset.FromUnixTimeSeconds creates a value with an explicit UTC offset.
PowerShell✓ Tested
Copy a file to a chosen destination
PowerShell: LiteralPath prevents wildcard characters in the source filename from being interpreted.
PowerShell✓ Tested
Count a result even when it is empty or has one item
PowerShell: Wrap pipeline results in an array subexpression for consistent Count behavior.
PowerShell✓ Tested
Count array elements
PowerShell: Count array elements using PowerShell 7.
PowerShell✓ Tested
Count day boundaries between dates
Compare date values with DATEDIFF.
DATEDIFF✓ Tested
Count days between calendar dates
PowerShell: Parse an unambiguous format before subtracting date values.
PowerShell✓ Tested