Select Page

Using sp_MSforeachtable

I actually stumbled upon this very stored procedure on the blog post by Suprotim Agarwal of sqlservercurry.com titled: How to skip a Table or Database while using sp_MSforeachdb or sp_MSforeachtable while just doing a little research about SQL Server. I honestly...

Concatenation Fields

In some instances you are required to piece together data by slapping fields together. This is probably most common with names, addresses and such. Using the AdventureWorksLT database I will illustrate how to concatenate a few fields to comprise a single full name...

Formating Date and Time

We synchronize GIS data differentially using a proprietary method. As part of the process a date-time parameter is passed and the system updates the GIS accordingly given the time stamp value. Since this is a differential sync only the changes that occurred within the...

Get them Server Properties

Though this may be trivial it is always useful. There are many ways to determine what version, edition and service pack level of SQL Server you are running. So here is a one way to get the information you need. TSQL SELECT RIGHT(LEFT(@@VERSION,25),15) AS [Product]...