Click here to monitor SSC
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 901    Older >>
 

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 | 42 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 | 498 reads

Extarcting string after and before a Character/Pattern

Finding characters/string before and after some character or pattern  Read more...
Rating: |  Discuss |   Briefcase | 1,212 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,373 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,230 reads

Dynamic Sudoku for 3X3

it is a 3X3 dynamic sudoku  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 933 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,769 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 2016/06/15 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,335 reads

Standardize Object Names

Rename all database objects to use a standardize naming convention.  Read more...
By Cody Allen 2015/05/25 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,358 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 2015/05/14 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,607 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 | 130 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 | 884 reads

Stupid Coding Tricks: The T-SQL Mandelbrot

The bar for entry into CodeSOD is pretty straight forward: professionally-developed code that elicits that certain What The— reaction. Though there have been a few exceptions over the years, generally speaking, student code, hobbyist code, and amateur code need not apply. That said, I'd like to try something a little different today. Today's example is not technically professionally-developed, it's a Stupid Coding Trick. "So I was bored at work one day," Graeme Job explains, "and wondered, what's the most useless thing I could do with my time without actually doing anything. Then it hit me. I could use T-SQL to generate... Mandelbrot." Graeme continued, "Following is a single T-SQL SELECT statement that generates a text-representation of a Mandelbrot Set. The results are best viewed in text-mode."  Read more...
By gogulatorul 2016/01/22 | Source: SQLServerCentral.com | Category: humor
Rating: |  Discuss |   Briefcase | 4,542 reads

PatExclude8K

Removes characters in the a string (@string) that matches a specific pattern (updated 12-3-14)  Read more...
By Alan Burstein 2016/06/10 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,916 reads

Get month days

Gets the number of days in a month  Read more...
By Igor Micev 2014/11/10 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,242 reads

Find only characters or only integer from alphanumeric value

Extract only integers or characters from alphanumeric :  Read more...
By Vimal Lohani 2014/10/07 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,450 reads

Sudoku Generator/Solver

TSQL Sudoku generator and solver.  Read more...
By Matthew Faye 2014/09/17 | Source: SQLServerCentral.com | Category: game
Rating: |  Discuss |   Briefcase | 2,003 reads

Calculate gregorian easter sunday using a table valued function

Calculate gregorian easter sunday using a table valued function.  Read more...
By Robin Langell 2014/09/03 | Source: SQLServerCentral.com | Category: easter sunday
Rating: |  Discuss |   Briefcase | 650 reads

Paginating a SQL query result set

How to Paginate a query result set to keep from pulling the whole result set to the client side   Read more...
By Greg Ryan 2015/11/02 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 3,554 reads

Count all records the tables

Count all the records from the tables that exist in a database  Read more...
Rating: |  Discuss |   Briefcase | 1,888 reads
   Items 1 to 20 of 901    Older >>