This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRY | |
-- removing IDENTITY specification from master table. Premaster table will have IDENTITY specification, and the ID will carry forward to the master table | |
BEGIN TRANSACTION REMOVE_IDENTITY_SPEC | |
CREATE TABLE [dbo].[MstrInvAssetPartyRoleRel_withoutIdentitySpecification] ( | |
[InvAssetPartyIDNum] [int] NOT NULL, | |
[InvAstIdNum] [int] NOT NULL, | |
[PartyRoleRelIDNum] [int] NOT NULL, | |
[CADIS_SYSTEM_INSERTED] [datetime] NULL, | |
[CADIS_SYSTEM_UPDATED] [datetime] NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- will contain data about the data flow source monitor tables | |
DECLARE @tableInfo TABLE ( | |
table_id INT identity(1, 1), -- a unique identifier we will use to loop over the tables | |
table_name NVARCHAR(max) -- the name of the table in question, used to build the dynamic query while in the loop | |
) | |
-- popuplate the table with the names of tables used to store source monitor info for the data flows | |
INSERT @tableInfo | |
SELECT table_name | |
FROM INFORMATION_SCHEMA.TABLES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT sys.objects.object_id, | |
sys.schemas.NAME AS [Schema], | |
sys.objects.NAME AS Object_Name, | |
sys.objects.type_desc AS [Type] | |
FROM sys.sql_modules(NOLOCK) | |
INNER JOIN sys.objects(NOLOCK) ON sys.sql_modules.object_id = sys.objects.object_id | |
INNER JOIN sys.schemas(NOLOCK) ON sys.objects.schema_id = sys.schemas.schema_id | |
WHERE sys.sql_modules.DEFINITION COLLATE SQL_Latin1_General_CP1_CI_AS LIKE '%.PartyTitleTxt%' ESCAPE '\' | |
ORDER BY sys.objects.type_desc, | |
sys.schemas.NAME, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DP.NAME, | |
m.c.value('ProcType[1]', 'varchar(max)') AS ProcType, | |
m.c.value('AutoTruncate[1]', 'varchar(max)') AS AutoTruncate, | |
m.c.value('Name[1]', 'varchar(max)') AS [Input Name] | |
FROM [CADIS_SYS].[DP_DATAPORT] DP | |
CROSS APPLY DP.[DEFINITION].nodes('CadisXml/Content/Inputs/list/Item') AS m(c) | |
WHERE m.c.value('AutoTruncate[1]', 'varchar(max)') = 'True' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists (select 1 from INFORMATION_SCHEMA.ROUTINES where ROUTINE_SCHEMA = 'dbo' and ROUTINE_NAME = 'spDmRealign') | |
drop procedure dbo.spDmRealign | |
go | |
create procedure dbo.spDmRealign | |
@oldCadisId int, | |
@newCadisId int, /* Set @newCadisId = 0 below to get a *new* CadisID generated and assigned, or alternatively set to an existing target CadisID */ | |
@matcherName nvarchar(100), | |
@sourceName nvarchar(100) | |
as begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
PK.CONSTRAINT_NAME, | |
COLS.TABLE_SCHEMA, | |
COLS.TABLE_NAME, | |
COLS.COLUMN_NAME, | |
COLS.DATA_TYPE, | |
COLS.COLUMN_DEFAULT, | |
COLS.CHARACTER_MAXIMUM_LENGTH, | |
COLS.NUMERIC_PRECISION, | |
COLS.IS_NULLABLE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table cadis_proc.dm_mp7_result_temp | |
drop table cadis_proc.dm_mp7_result_audit_temp | |
drop table cadis_proc.dm_mp7_proposed_temp | |
exec SPDM_CLEARRESULTS @ProcessName = 'TESTER2', @SourceName = 'All', @ResetIds = 1, @PrintOnly = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
summary: | |
fnDbVars returns database variable names and values from a Markit EDM database | |
parameters: | |
- name : variableName | |
type: nvarchar(MAX) | |
description: the name of the database variable you want returned | |
ifNull: the function will return all database variables | |
author: Adam Roderick | |
examples: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this scripts assumes Ubuntu 14.04 LTS | |
# ensure the following sources are in /etc/apt/sources.list | |
# deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse | |
# deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(function(d) { | |
d.getElementsByName('clientstring')[0].value = 'parku'; | |
d.getElementsByName('courseid')[0].value = '2022037'; | |
d.getElementsByName('pagetoload')[0].selectedIndex = 1; | |
d.forms[0].submit(); | |
})(document); | |
/* paste into a bookmarklet javascript: <the code> */ |