SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts with tag t-sql Rss

Search for any content tagged t-sql

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

   Items 1 to 20 of 909    Older >>
 

Date Dimension Script

T-SQL script that creates Date_Dim & populates it for any date-range.  Read more...
By Dave Bunch 2017/05/08 | Source: SQLServerCentral.com | Category: data warehousing
Rating: |  Discuss |   Briefcase | 598 reads

Building calendar table using MTVF

This script is a small extension to this excellent article http://www.sqlservercentral.com/articles/calendar/145206/   Read more...
By Darko Martinovic 2017/03/28 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,134 reads

Getting resource content from blocked process report

This script serves to display the content of the waiting resource. It is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCRL.   Read more...
By Darko Martinovic 2017/02/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 434 reads

Getting resource name from blocked process report

The Resource name is most important information in the blocked process report. The purpose of this script is to decode this information. The script is divided in two parts. In first one I'm using t-sql, and in second one I accomplished the same task using SQLCLR.   Read more...
By Darko Martinovic 2017/04/21 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 798 reads

Find unused columns

Script finds all columns in a table that have a single value.  Read more...
By Clay Punnett 2016/11/28 | Source: SQLServerCentral.com | Category: columns
Rating: |  Discuss |   Briefcase | 889 reads

Calculate two internships

Calculates total length of services for a employee. Calculates( addition or subtraction) two internships in form of yy.mm.dd   Read more...
By Darko Martinovic 2016/10/19 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 378 reads

Date calculation

Data calculation in form yy mm dd  Read more...
By Darko Martinovic 2016/10/17 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 646 reads

Delete Files in Shared Location/SAN

Delete files via TSQL procedure in shared location  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 377 reads

Find Free Space by Database

This is one of the handy script to find the free space by each database. This is useful when you troubleshoot the database space issues.   Read more...
Rating: |  Discuss |   Briefcase | 630 reads

Agent Job Schedule Description

Yet another schedule description query with added grammatical improvements.  Read more...
By Michael McCormick 2016/05/06 | Source: SQLServerCentral.com | Category: sql server
Rating: |  Discuss |   Briefcase | 612 reads

Extracting string after and before a Character/Pattern

Finding characters/string before and after some character or pattern  Read more...
Rating: |  Discuss |   Briefcase | 1,585 reads

Calculate relative time

dynamically calculates a timestamp  Read more...
By Wilfred van Dijk 2015/09/30 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,397 reads

Conver Number to string ( exp. 9 - 0009 or 9 - 09)

This Function convert integer to string with N number of ceros to the left  Read more...
By Andrés Novelo 2015/07/22 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,254 reads

Dynamic Sudoku for 3X3

it is a 3X3 dynamic sudoku  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 953 reads

A new set-based T-SQL solution for Sudoku puzzle

New set-based T-SQL solution for Sudoku puzzle using binary data and bitwise operations.   Read more...
By Kevin Duan 2016/04/05 | Source: SQLServerCentral.com | Category: set based
Rating: |  Discuss |   Briefcase | 1,823 reads

PatReplace8K

This inline table valued function takes three parameters: @String, @Pattern and @Replace. It located the @pattern in @string and replaces it with @replace.   Read more...
By Alan Burstein 2017/03/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,715 reads

Standardize Object Names

Rename all database objects to use a standardize naming convention.  Read more...
By Cody Allen 2016/08/19 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,811 reads

Dynamic Table Name on Select Into

Based upon todays date as suffix and chosen string as prefix, select data from predefined table into dynamically named new table. Script is properly error handled with most common errors  Read more...
By Jo Dacey 2016/07/27 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,229 reads

Database Mirroring Setup Procedure generator

A script that generates all the commands for installing a new database mirroring between two servers  Read more...
By Jefferson Elias 2015/03/17 | Source: SQLServerCentral.com | Category: mirroring
Rating: (not yet rated) |  Discuss |   Briefcase | 134 reads

Database Mirroring Setup Procedure generator

A script that generates all the commands for installing a new database mirroring between two servers  Read more...
By Jefferson Elias 2015/03/20 | Source: SQLServerCentral.com | Category: mirroring
Rating: (not yet rated) |  Discuss |   Briefcase | 900 reads
   Items 1 to 20 of 909    Older >>