Show MenuHide Menu

Tag: sql server

Delimiting identifiers in sql server

September 28, 2015

There are two means of delimiting identifiers in T-SQL:

1) Using Square Brackets e.g. [MyColumn] this is proprietary to T-SQL

2) The ANSI standard way using double quotes, “MyColumn”

But delimiting is only required when an identifier does not conform to the rules for formatting identifiers. These rules are that the first character must be an upper or lower case letter, underscore, @ sign or number sign. The identifier cannot be a reserved word, no embedded spaces and no supplementary characters. If the identifier does not meet these requirements it must be delimited.

Building Your T-SQL Tool Kit: Window Function Fundamentals

June 23, 2015

SQL Server 2008–Interview Questions and Answers

April 18, 2014

Very useful interviews questions and answers courtesy of Pinal Dave:

MCSA Certification Prep | Exam 461: Querying Microsoft SQL Server 2012

April 15, 2014

Instant SQL Formatter

January 17, 2014

image Useful online tool for formatting T-SQL code which also generates the same code in HTML.

Available here:

Baselining and Benchmarking

December 28, 2012

SQL server to Excel

December 4, 2012
Erland Sommarskog does it again after his excellent article on dynamic SQL he has posted the following on exporting from SQL server to Excel:

1) OPENROWSET/OPENQUERY – some people try this, resulting in varying levels of frustration.
2) SQL Server Integration Services – a standard method, but I am not versed in SSIS myself.
3) sp_OAxxxx – please don’t even think about it.
4) Have Excel to access SQL Server from VBA.
5) Write a program in a traditional language like C# or Perl.


Dedicated administrator connections are not supported. (ObjectExplorer)

June 19, 2012

Got the following error when trying to connect to a SQL server instance using the DAC connection. Solution provided by Ritesh Shah

Don’t try to login via object explorer, rather cancel that window and follow the given steps below.

File Menu->New->Database Engine Query


Load XML schema dynamically

June 17, 2012

This is very useful…instead of typing in entire XML schema load it directly from a schema (XSD) file using openrowset:

declare @schema XML
   BULK ‘c:\logRecordSchema.xsd’, SINGLE_BLOB) AS TEMP(c)


What version of SQL Server do I have?

April 30, 2012

Following on from this post on identifying SQL server versions, this blog gives very detailed information on all SQL server versions and service packs