Results for “temporary table”
Small, practical examples. Search by task or narrow things down below.
Calculate a value with SELECT
SQL: Evaluate a small arithmetic expression on the database server.
SQL✓ Tested
Calculate each group’s integer percentage of the total
SQL: Multiply before division and protect against a zero denominator.
SQL✓ Tested
Calculate each group’s numeric spread
SQL: Subtract MIN from MAX to report the difference between extremes.
SQL✓ Tested
Capture a command’s success-stream output
PowerShell: Assignment collects output values without requiring text redirection to a file.
PowerShell✓ Tested
Catch a T-SQL error
Handle an expected conversion error in TRY/CATCH.
TRY CATCH✓ Tested
Change directory only for one operation
Bash Scripts: A subshell makes a temporary directory change without affecting later commands.
Bash Scripts✓ Tested
Check a string prefix using ordinal comparison
PowerShell: Supply an explicit comparison rule for protocol identifiers.
PowerShell✓ Tested
Check a suffix without case sensitivity
PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.
PowerShell✓ Tested
Check an external process exit status explicitly
PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.
PowerShell✓ Tested
Check whether a command can be resolved
PowerShell: Get-Command with a local error override supports an expected missing-command lookup.
PowerShell✓ Tested
Choose an action with switch
Map a small command value to a result.
switch✓ Tested
Clamp a number to inclusive bounds
PowerShell: Math.Clamp chooses the nearest endpoint for an out-of-range value.
PowerShell✓ Tested