Skip to content

Instantly share code, notes, and snippets.

-- Dropping existing views
DROP VIEW IF EXISTS view_people_addresses;
DROP VIEW IF EXISTS view_people_phone_numbers;
DROP VIEW IF EXISTS view_people_emails;
-- Dropping existing tables
DROP TABLE IF EXISTS people_email_mapping CASCADE;
DROP TABLE IF EXISTS people_phone_number_mapping CASCADE;
DROP TABLE IF EXISTS people_address_mapping CASCADE;
DROP TABLE IF EXISTS people_household_mapping CASCADE;
CREATE PROCEDURE GetTeamNameOrAbbreviation
@team NVARCHAR(255),
@slot INT
AS
BEGIN
IF @slot = 0
BEGIN
-- Extract and return the part before the parentheses
RETURN LEFT(@team, CHARINDEX(' (', @team) - 1)
END
'''
File: (script-name)
Version: (script version number)
Description: (description of script)
Project: (project name)
Created Date: (date file created [yyyy-mm-dd format])
Author: Adge Denkers
Email: adriaan.denkers@va.gov
-----
Last Modified: (date file updated [yyyy-mm-dd format])
'''
Name: (script-name)
Description: (description of script)
Author: Adge Denkers / https://github.com/adgedenkers/
Created: (creation date)
Updated: (last update date)
(C) (current year) denkers.co
'''
IF Statements in Excel
=if( [logical-condition], [result-if-true], [result-if-false] )
Example:
=if( [STATION]="101", "New-York", "Not-New-York" )
// If [STATION] equals "101", then set the cell value to "New-York", otherwise set it to "Not-New-York".