A database backup does not carry the key that opens your encrypted data. Export both keys, restore one from its file, and see why the password matters.
SQL SERVER – Geography Data Type – Calculating Distance Between Two Points on the Earth – Day 18 of 35
The Geography Data Type in SQL Server 2008 stores points and areas on the earth and has a built-in function to calculate the distance between two points.
SQL SERVER – Ranking Functions – RANK( ), DENSE_RANK( ), and ROW_NUMBER( ) – Day 12 of 35
RANK( ), DENSE_RANK( ), and ROW_NUMBER( ) return the same results until your data has a tie. Day 12 shows how each ranking function handles tied values.
geometry STLength: A Path Is Longer Than Its Chord
geometry STLength measures the segments of a line. The example contrasts that path length with the shortest distance between its endpoints, including a closed line.
FOR XML XSINIL: Emit Missing Fields as Explicit Nil Elements
FOR XML XSINIL can represent SQL NULL with an explicit element carrying the xsi:nil attribute. I compare that output with ordinary element omission. An empty string stays a separate input in both versions.
SQL SERVER – Tips from the Development Series – Overriding Identity Fields – Day 9 of 35
Identity fields give each new customer or invoice a unique number, even with many users entering data. Here is when and how to go about Overriding Identity Fields.
SQL SERVER – Row Constructors – Day 6 of 35
Before SQL Server 2008, 20 rows meant 20 INSERT INTO statements. Row Constructors let you insert them all in one statement. A simple example to try.






