T-SQL

Technical Article

sp to drop multiple similarly named db

  • Script

Procedure:    usp_drop_multiple_databases Description:    This procedure will take a string as input (it can take the % character in the calling string), put all db like that name into a list, and then drop all the databases in the resultant list.                    Example calling syntax: usp_drop_multiple_databases 'test_%_delete'--> Will drop ALL databases with a […]

You rated this post out of 5. Change rating

2004-07-29 (first published: )

77 reads

Technical Article

Advanced Search Stored Procedure

  • Script

The script finds occurrences of string(s) in stored procedures, triggers and views. You can use typical boolean logic as described in the script comments. Very useful.  It was found on the companion cd to [Gurus Guide to Transact-SQL] by Henderson.  I left in the original credits.  Excellent procedure.  Some may scoff but I place it […]

You rated this post out of 5. Change rating

2004-07-15 (first published: )

669 reads

Technical Article

Format numeric values to language specific format

  • Script

SQL Server returns numeric values always in a internal format. The conversion of numeric values into a language specific format is usually part of the client. With this User Defined Function, you can do thison your backend. The function expects 3 parameters: The numeric value, the requested language and the number of decimals (will be […]

You rated this post out of 5. Change rating

2004-07-13 (first published: )

319 reads

Technical Article

Ping Linked Server

  • Script

This Stored Procedure serves to verify if some error with the source of data of a Linked Server exists. In this in case,  I will use a mdb that already exists in the Office - Northwind.mdb. If we do a Link Server  concerned to this mdb, this is generated without errors . But when this […]

You rated this post out of 5. Change rating

2006-11-02 (first published: )

711 reads

SQLServerCentral Article

When To Use the Order By Clause

  • Article

The ORDER BY clause is one of the basic keywords that defines the SQL Language. And it can help prevent strange results from being returned to the average user. Read on to see how and why this addition to your queries can help ensure more "ordered" results 🙂

3 (2)

You rated this post out of 5. Change rating

2004-05-19

11,524 reads

Technical Article

Foreign keys chain in a view. It may be useful.

  • Script

I made this view because I had to generate a sql server database from  an Oracle database and I had to knew the order in which I import tables.This view, which may be improved, contains the foreign key, the primary and detail table, the column and it's position and may be useful in  many situations

You rated this post out of 5. Change rating

2004-08-25 (first published: )

107 reads

Technical Article

Get all Tables and Columns for each Database

  • Script

This script will get the name of each database from master..sysdatabases, then use each database's Information Schemata to get the tables and columns in each of the databases. Several recent requests for assistance have used this to answer their needs. I ran it across 245 databases and pulled back 1.4 million results in about 30 […]

5 (1)

You rated this post out of 5. Change rating

2004-04-15

1,331 reads

Blogs

The CDO’s Playbook for AI Driven Decision Making

By

The New Arena of Leadership The role of the Chief Data Officer is no...

sp_snapshot – The easy way to take database snapshots of one or more databases – V3.0

By

Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...

SELECT *

By

SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...

Read the latest Blogs

Forums

combining a param value with widcards in a foreach loop files property

By stan

Hi, it isnt clear from the web if something like this should work as...

Extract sql data in psh

By Sqladmin1

# Load ImportExcel module Import-Module ImportExcel -ErrorAction Stop # File paths $outFile = "C:\Reports\SQLReport.xlsx"...

caught off guard by some greek lettering in a warehouse feed

By stan

Hi we run 2019 standard.   Our warehouse's ssis based etl is klunky but so...

Visit the forum

Question of the Day

Vector Datatype

The new Vector datatype in SQL Server 2025 is a binary type that has a few parameters. What parameters are required?

See possible answers