Tag: sql server
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.
Very useful interviews questions and answers courtesy of Pinal Dave:
Available here: http://www.dpriver.com/pp/sqlformat.htm
|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.
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
This is very useful…instead of typing in entire XML schema load it directly from a schema (XSD) file using openrowset:
declare @schema XML