Skip to content

Instantly share code, notes, and snippets.

@FilipDeVos
FilipDeVos / Aggregate_Concatenate.sql
Last active October 15, 2023 03:36
SQL Server Aggregate to concatenate strings
-- This script deploys the dbo.Concatenate() aggregate function on SQL Server. This is compiled from the code Concatenate.cs below.
CREATE ASSEMBLY [concat]
FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C010300E3EE2A540000000000000000E00002210B010B00000C00000006000000000000AE2B0000002000000040000000000010002000000002000004000000000000000400000000000000008000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000602B00004B000000004000009003000000000000000000000000000000000000006000000C000000282A00001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E74657874000000B40B000000200000000C000000020000000000000000000000000000200000602E7273726300000090030000004
@freemo
freemo / enforce-eol.sh
Created November 1, 2014 07:10
A GIT hook for enforcing EOL characters
#!/bin/sh
#echo ""
#echo "==== Remote update-hooks/file-hooks/enforce-eol.sh ===="
#Initialize
ref="$1"
old_rev="$2"
new_rev="$3"
@jalgaba
jalgaba / Aggregate_Concatenate.sql
Last active January 24, 2019 19:06 — forked from FilipDeVos/Aggregate_Concatenate.sql
SQL Server Aggregate to concatenate DISTINCT strings
-- This script deploys the dbo.ConcatDistinct() aggregate function on SQL Server. This is compiled from the code ConcatDistinct.cs below.
CREATE ASSEMBLY [concat_distinct]
--FROM 'C:\<your_compiled_assembly>.dll'
FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C01030095B0EC560000000000000000E00002210B010B000010000000060000000000001E2F0000002000000040000000000010002000000002000004000000000000000400000000000000008000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000CC2E00004F000000004000003803000000000000000000000000000000000000006000000C000000942D00001C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E74657874000000240F0000002000000010000000020