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
| use master | |
| go | |
| create database OriginalDB | |
| go | |
| use OriginalDB | |
| go | |
| create table SeededTable(id int identity, name nvarchar(20)) |
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
| ## update OS | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| ## innstall docker | |
| ## https://gist.github.com/AlexanderAllen/48436790b793f710c8c4e6edf3637891#file-install_docker_ubuntu_wsl-sh | |
| ## https://medium.com/@callback.insanity/using-docker-with-windows-subsystem-for-linux-wsl-on-windows-10-d2deacad491f | |
| # Update the apt package list. | |
| sudo apt-get update -y |
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
| USE cauldron | |
| go | |
| CREATE TABLE __header ( ID int, name nvarchar(10)) | |
| GO | |
| CREATE TABLE __detail ( ID int, headerID int, detailName nvarchar(50), updated timestamp -- this will generate an incrementing timestamp on update) | |
| GO | |
| INSERT INTO dbo.__header |
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
| ' original http://vbnet.mvps.org/index.html?code/fileapi/pathcompactpath.htm | |
| Option Explicit | |
| '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
| ' Copyright ©1996-2011 VBnet/Randy Birch, All Rights Reserved. | |
| ' Some pages may also contain other copyrights by the author. | |
| '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
| ' Distribution: You can freely use this code in your own | |
| ' applications, but you may not reproduce | |
| ' or publish this code on any web site, | |
| ' online service, or distribute as source |
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
| CREATE TABLE #Person ( ID INT IDENTITY PRIMARY KEY, Name NVARCHAR(100)) | |
| GO | |
| CREATE TABLE #Pets ( PetsID INT IDENTITY PRIMARY KEY, PetName NVARCHAR(100)) | |
| GO | |
| CREATE TABLE #PersonPets ( PersonID INT , PetsID INT) | |
| GO | |
| INSERT INTO #Person | |
| ( | |
| 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
| Item Code | Item Description | Old Location Code | New Location Code | Purpose | |
|---|---|---|---|---|---|
| F031 | MILK FULL CREAM EMBORG 1L/12BOX CASE | FOOD | FS01 | No location yet | |
| F003 | SODA SPRITE 330ML/24CAN CASE | FS2 | FS04 | Transfer Location |
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
| '--- this code is a direct translation of a C# to VB.NET (http://converter.telerik.com/) since I can no longer write a sane VB code ;) | |
| Public Partial Class Form1 | |
| Inherits Form | |
| 'cache our quotes | |
| Private _quotes As List(Of Quotes) = New List(Of Quotes)() | |
| 'track the current quote id | |
| Private _currId As Integer = 0 | |
| Public Sub New() |
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 o.name, i.name AS [Index Name], | |
| STATS_DATE(i.[object_id], i.index_id) AS [Statistics Date], | |
| s.auto_created, s.no_recompute, s.user_created | |
| FROM sys.objects AS o WITH (NOLOCK) | |
| INNER JOIN sys.indexes AS i WITH (NOLOCK) | |
| ON o.[object_id] = i.[object_id] | |
| INNER JOIN sys.stats AS s WITH (NOLOCK) | |
| ON i.[object_id] = s.[object_id] | |
| AND i.index_id = s.stats_id | |
| WHERE o.[type] = 'U' |
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 row_number() over (order by (select null)) as RowId, | |
| FileName, | |
| ItemId | |
| INTO #result | |
| FROM cm_steps | |
| DECLARE | |
| @i int, @max int, | |
| @parentId int, |
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
| -- configure server first | |
| EXEC sp_configure ‘show advanced options’, 1 ; | |
| GO | |
| RECONFIGURE ; | |
| GO | |
| /* Enabled the blocked process report */ | |
| EXEC sp_configure 'blocked process threshold', '10'; | |
| RECONFIGURE | |
| GO | |
| /* Start the Extended Events session */ |
NewerOlder