13

  • T-SQL Comparing Sub queries and CTE's there's no real difference.
    • CTE's care recursive whereas sub queries are not
    • CTE's only live for the duration of the execution. If you need that data for multiple queries and it is used in multiple places then you're likely better off using temporary tables.
WITH myFirstCTE
AS
(
	SELECT * 
	FROM BOA_BAICodes
), mySecondCTE
AS
(
	SELECT TOP 100 *
	FROM myFirstCTE
	WHERE BAI_Code > 100
)
	SELECT SUM(CAST(BAI_CODE AS INT)) AS mySum
	FROM mySecondCTE
	WHERE BAI_Code > 200
git notes add -m 'Tested-by: Johannes Sixt <j6t@kdbg.org>' 72a144e2
git show -s 72a144e
#> [...]
#>    Signed-off-by: Junio C Hamano <gitster@pobox.com>
#>
#> Notes:
#>    Tested-by: Johannes Sixt <j6t@kdbg.org>
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
		
# This code src: https://www.meziantou.net/running-github-super-linter-in-azure-pipelines.html
# referenced docker container script: https://github.com/github/super-linter
trigger:
- '*'
		
# Use multiple jobs, so the linter can work in parallel to the build.
# This also allows to run the Linter on Linux whereas you build can run on Windows or Mac.
jobs:
- job: lint
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: docker pull github/super-linter:latest
	displayName: Pull GitHub Super-Linter image
- script: >-
	docker run \
	-e RUN_LOCAL=true \
	-v $(System.DefaultWorkingDirectory):/tmp/lint \
	github/super-linter
displayName: 'Run GitHub Super-Linter'