Skip to content

Instantly share code, notes, and snippets.

View matt40k's full-sized avatar

Matt Smith matt40k

View GitHub Profile
@matt40k
matt40k / mergeCSVFiles.ps1
Created November 17, 2016 18:58 — forked from conrjac/mergeCSVFiles.ps1
Powershell Script to merge multiple CSV files into one (by appending each file to the end)
$folder = 'C:\Data' #INPUT FOLDER PATH - e.g C:\Data
$files = Get-ChildItem $folder\*.csv -Exclude $folder\MergedCsvFile.csv
Get-Content $files | Set-Content $folder\MergedCsvFile.csv
$today = (Get-Date).ToString('yyyy-MM-dd')
$var = '<ReportParameters><Parameter id=\"1ikmaygI4+fhpdNyAeUC2A==\" subreportfilter=\"True\"><Name>Status</Name><Type>List</Type><PromptText>Status </PromptText><Values><ValidValue><Id>NULL</Id><Code>1</Code><Description>NULL</Description></ValidValue><ValidValue><Id>Further Intervention Required</Id><Code>1</Code><Description>Further Intervention Required</Description></ValidValue><ValidValue><Id>Resolved</Id><Code>1</Code><Description>Resolved</Description></ValidValue><ValidValue><Id>Resolved(1)</Id><Code>1</Code><Description>Resolved(1)</Description></ValidValue><ValidValue><Id>Unresolved</Id><Code>1</Code><Description>Unresolved</Description></ValidValue><ValidValue><Id>Unresolved(1)</Id><Code>1</Code><Description>Unresolved(1)</Description></ValidValue></Values></Parameter><Parameter id=\"mnz1mh+M9RnxwnGABFIBTg==\" subreportfilter=\"True\"><Name>Date</Name><Type>DateRange</Type><PromptText>Date is between</PromptText><Values><DateRange><Start>' + $today + 'T00
@matt40k
matt40k / gist:0359b3d46487831311f62dc71e9f7905
Last active November 11, 2018 18:42 — forked from mbourgon/gist:6029690
SSIS_2012_Show_Connection_Strings
USE ssisdb
--thebakingdba.blogspot.com 2013/07/18 1.00
--purpose - grab the connection strings from SSISDB for the package and the job runs.
SELECT ISNULL(project_based_values.project_name,
job_based_values.project_name) AS project_name,
ISNULL(project_based_values.package_name,
job_based_values.package_name) AS package_name,
ISNULL(project_based_values.parameter_name,
job_based_values.parameter_name) AS parameter_name,
project_based_values.Connection_String AS Project_Connection_String,