This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace file_edit | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains 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
# PostgreSQL Client Authentication Configuration File | |
# =================================================== | |
# | |
# Refer to the "Client Authentication" section in the PostgreSQL | |
# documentation for a complete description of this file. A short | |
# synopsis follows. | |
# | |
# This file controls: which hosts are allowed to connect, how clients | |
# are authenticated, which PostgreSQL user names they can use, which | |
# databases they can access. Records take one of these forms: |
This file contains 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
declare @test table ( | |
color_id integer, | |
color_name varchar(50) | |
); | |
insert into @test (color_id, color_name) values (1,'red'); | |
insert into @test (color_id, color_name) values (1,'red'); | |
insert into @test (color_id, color_name) values (1,'red'); | |
insert into @test (color_id, color_name) values (2,'blue'); | |
insert into @test (color_id, color_name) values (3,'yellow'); |
This file contains 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
declare @test table ( | |
id integer identity(0,1) not null, | |
dt1 datetime, | |
dt2 datetime | |
) | |
insert into @test (dt1) VALUES (dateadd(DAY, cast((rand() * 100) as int), getdate())) | |
insert into @test (dt1) VALUES (dateadd(DAY, cast((rand() * 100) as int), getdate())) | |
insert into @test (dt1) VALUES (dateadd(DAY, cast((rand() * 100) as int), getdate())) | |
insert into @test (dt1) VALUES (dateadd(DAY, cast((rand() * 100) as int), getdate())) |
This file contains 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 distinct | |
tbl1.col1 [Document ID], | |
tbl2.col2 [Description], | |
tbl1.col3 [Revision], | |
tbl1.col4 [Effective Date], | |
tbl4.col5 [Part#], | |
tbl5.col2 [Part Description] | |
FROM DB.dbo.table1 tbl1 | |
INNER JOIN DB.dbo.table2 tbl2 | |
ON tbl1.col1 = tbl2.col1 |
This file contains 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 view dbo.TheView | |
AS | |
select * from linkedserver.db.dbo.TheView | |
GO |
This file contains 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
# Makefile for building PyLucene | |
# | |
# Supported operating systems: Mac OS X, Linux and Windows. | |
# See INSTALL file for requirements. | |
# See jcc/INSTALL for information about --shared. | |
# | |
# Steps to build | |
# 1. Edit the sections below as documented | |
# 2. make | |
# 3. make install |
This file contains 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
DECLARE @CounterPrefix NVARCHAR(30) | |
SET @CounterPrefix = CASE | |
WHEN @@SERVICENAME = 'MSSQLSERVER' | |
THEN @CounterPrefix + '' | |
ELSE 'MSSQL$'+@@SERVICENAME+':' | |
END; | |
SELECT | |
server_name = @@SERVERNAME, | |
server_instance = @@SERVICENAME, | |
object_name, |
This file contains 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
-- XE Definition | |
CREATE EVENT SESSION [page_splits] ON SERVER | |
ADD EVENT sqlos.wait_info( | |
ACTION (sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) | |
WHERE ([sqlserver].[database_id]=(18))), | |
ADD EVENT sqlos.wait_info_external( | |
ACTION (sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) | |
WHERE ([sqlserver].[database_id]=(18))), | |
ADD EVENT sqlserver.page_split( | |
ACTION(sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) |
This file contains 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 | |
TOP(100) | |
collection_date = GETDATE(), | |
database_name = DB_NAME(CAST(pa.dbid AS INTEGER)), | |
database_name_exec = DB_NAME(CAST(pa.dbid_execute AS INTEGER)), | |
qs.total_worker_time, | |
qs.execution_count, | |
qs.sql_handle, | |
qs.plan_handle, | |
qs.creation_time, |
OlderNewer