Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts with tag Miscellaneous Rss

Search for any content tagged miscellaneous

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 834    Older >>
 

BCP Format File Builder

Utility stored procedure to create non-xml format file for BCP/BULK INSERT processes. Very useful for text-qualified CSV files.  Read more...
By Paul Hunter 2009/08/14 | Source: SQLServerCentral.com | Category: sql server 2005
Rating: |  Discuss |   Briefcase | 2,182 reads

Find SQL Server Install Date

Script to find the SQL Server Instance Install Date  Read more...
By Vijendran R 2010/05/07 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 2,905 reads

Prime Number Table Generator (new ver crunches to 1 Mil in <10.5 sec!)

Generates prime numbers and puts them into a table for future reference by adhoc queries and database and application code. 100% set-based. DDL embedded.  Read more...
By Jesse Roberge 2009/07/15 | Source: SQLServerCentral.com | Category: advanced querying
Rating: |  Discuss |   Briefcase | 1,213 reads

Find SQL Server TCP/IP Port Number

Script to find the TCP/IP Port number of SQL Instance  Read more...
By Vijendran R 2010/05/13 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 3,531 reads

Function to Add Leading 0's (Zeros) to an INT

Very simple function code to add leading zeros to a passed in int for a length also passed.  Read more...
By Joshua A. Walker 2009/03/05 | Source: SQLServerCentral.com | Category: data warehousing
Rating: |  Discuss |   Briefcase | 1,573 reads

Function to Return Date and Time String for File Archiving

This function will return a string in sortable format YYYYMMDD-hhmmssnnn to append to file names for archiving.  Read more...
By Joshua A. Walker 2009/02/18 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 1,396 reads

Find Text in all columns of all tables in a Database

Will find the Table Name, Column Name and the number of occurances some text appears in a database.  Read more...
By Joshua A. Walker 2013/12/20 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 8,429 reads

Search All SQL Script Objects in All Databases for Text

Edit the @SearchText and you can enter any text you would like to search for in SQL Objects.  Read more...
By Joshua A. Walker 2013/05/21 | Source: SQLServerCentral.com | Category: stored procedures
Rating: |  Discuss |   Briefcase | 2,656 reads

Yet Another Deleting Duplicate Records (in-place)

Here is another "deleting duplicate records" script, this time in-place, using a uniqueidentifier column.  Read more...
By Peter Petrov 2009/01/15 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 1,850 reads

Counter Table (table of numbers) Setter-Upper for SQL Server 2005

Sets up 3 'table of numbers' that completely fill a 1, 2, and 3-level clustered index respectivly with 622, 386884, and 240641848 numbers.  Read more...
By Jesse Roberge 2008/08/05 | Source: SQLServerCentral.com | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 879 reads

Counter Table (table of numbers) Setter-Upper for SQL Server 2000

Sets up 3 'table of numbers' that completely fill a 1, 2, and 3-level clustered index respectivly with 620, 384400, and 238328000 numbers.  Read more...
By Jesse Roberge 2008/08/05 | Source: SQLServerCentral.com | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 456 reads

Proc to Rename a file

A simple way to rename a file from within a T-SQL Script, primarily designed to add a date-time stamp. Works in 2000 and 2005.  Read more...
By Simon Facer 2011/10/28 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 2,775 reads

A Sudoku solution with set based T-SQL utilizing binary operators

A Sudoku solution with set based T-SQL approach utilizing binary values and operators, to ease the algorithm.  Read more...
By Kevin Duan 2011/12/21 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 3,498 reads

Row count and space used for all tables in database (update)

This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).   Read more...
By Rafal Skotak 2011/05/25 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 9,819 reads

Select from stored procedure

This terse script shows an easy (but "dirty" - so not advisable for production environments - rather for personal use) way to select data from stored procedure.  Read more...
By Rafal Skotak 2011/12/14 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 4,048 reads

Generating number sequences with Common Table Expressions

The script shows one of ways generating number sequence - this one uses CTE.  Read more...
By Rafal Skotak 2011/10/04 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 1,795 reads

Generating permutations - procedure

This procedure prepares a query for generating permutations of n-numbers set and executes it.  Read more...
By Rafal Skotak 2008/03/18 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 901 reads

Clear database - delete all records from a database (updated)

The procedure below deletes all records from the specified database's(except master, model, msdb and tempdb) tables (except those from the schema 'sys').  Read more...
By Rafal Skotak 2011/12/09 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 4,032 reads

Search for a specified GUID (or its part) in all databases (updated)

This procedure searches for the specified GUID (or its part) in all (or selected one) databases  Read more...
By Rafal Skotak 2008/03/06 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 838 reads

Sorted views in 2005 and TOP clause

These examples show how You can circumvent the problem with not working TOP 100 PERCENT and ORDER BY in views.  Read more...
By Rafal Skotak 2008/02/22 | Source: SQLServerCentral.com | Category: miscellaneous
Rating: |  Discuss |   Briefcase | 1,246 reads
   Items 1 to 20 of 834    Older >>