To create a Table
create table risk_clos_rank(
id_num int IDENTITY(1,1) NOT NULL,
username nvarchar(100),
datetime_of_decision DATETIME
);
CREATE TABLE TheNameOfYourTable (
ID INT NOT NULL IDENTITY(1,1),| $user = "juergenhoetzel" | |
| $p = 1 | |
| do { | |
| $full_names = Invoke-RestMethod "https://api.github.com/users/$user/starred?per_page=100&page=$p" | |
| $full_names.ForEach({$_.full_name}) | |
| $p++ | |
| } while ($full_names.Length -gt 0) |
| # Dark Theme | |
| $file = gi "${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef"; ($file | gc) -Replace '(.*{1ded0138-47ce-435e-84ef-9ec1f439b749})', '//$1' | Out-File $file; | |
| # Query execution settings | |
| $ssmsUserSettingsFile = "$($env:APPDATA)\Microsoft\SQL Server Management Studio\18.0\UserSettings.xml"; | |
| $newXml = "<Element><Key><int>-1</int></Key><Value><string /></Value></Element> | |
| <Element><Key><int>3</int></Key><Value><string /></Value></Element> | |
| <Element><Key><int>4</int></Key><Value><string /></Value></Element> | |
| <Element><Key><int>5</int></Key><Value><string>USE </string></Value></Element> | |
| <Element><Key><int>6</int></Key><Value><string>SELECT FORMAT(COUNT(*),'N0') FROM </string></Value></Element> | |
| <Element><Key><int>7</int></Key><Value><string>SELECT TOP(100) * FROM </string></Value></Element> |
To create a Table
create table risk_clos_rank(
id_num int IDENTITY(1,1) NOT NULL,
username nvarchar(100),
datetime_of_decision DATETIME
);
CREATE TABLE TheNameOfYourTable (
ID INT NOT NULL IDENTITY(1,1),| -- Thanks to http://justinsomnia.org/2009/04/the-emp-and-dept-tables-for-mysql/ | |
| DROP TABLE IF EXISTS emp; | |
| CREATE TABLE emp ( | |
| empno decimal(4,0) NOT NULL, | |
| ename varchar(10) default NULL, | |
| job varchar(9) default NULL, | |
| mgr decimal(4,0) default NULL, | |
| hiredate date default NULL, |
SQLServer:SQL Statistics - Batch Requests/sec. Trend this on an hourly basis and break it out by Weekday/Weekend| #!/bin/bash | |
| # Performs a dump of target database and compresses result. | |
| # Outputs to: $DUMPDIR/$DUMPNAME.tar.xz | |
| # Note: Absolute paths are required for use in cron jobs | |
| DBNAME=meteor | |
| ROOTDIR=/Users/alanning/foo | |
| DUMPDIR=$ROOTDIR/dumps |
| SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; | |
| BEGIN TRANSACTION; | |
| Declare @counter int | |
| select @counter = counterID from myTable order by counterID asc | |
| select @counter = @counter + 1 | |
| INSERT INTO myTable (counterID) VALUES (@counter) | |
| Select @counter as newCounterID | |
| COMMIT TRANSACTION; |