SQL Server 2008 R2 - Free Book from Microsoft
If you are a sql server developer and wanted to have some free ebook on sql server 2008.
Here is the link I found while looking for the same. There is a free ebook download available on microsoft site for "SQL Server 2008 R2" edition.
This online book is the primary documentation for SQL Server.
Books Online includes the following types of information:
Setup and upgrade instructions.
Information about new features and backward compatibility.
Conceptual descriptions of the technologies and features in SQL Server.
Procedural topics describing how to use the various features in SQL Server.
Tutorials that guide you through common tasks.
Preparing for SQL Server Interview
When you go for an interview, have you ever wished that someone would just give you a list of questions so you knew what to study for? Well, now your wishes have come true with SQL Server Interview Questions and Answers.
The authors Pinal Dev and Vinod Kumar have already attended many interviews themselves so seem to know all the questions you should brush up on and how to really impress your future boss. More...
SQL Server Queries, Running under a process
Some time it requires to know what actually the SQL Server is executing under a process. So that we can know where exactly the procedure/query is stuck right now. Which helps us to know whether we can kill the running process or not. By making use of the inputbuffer it gives only the procedure (with parameteres) currently executed by the process, in the case of a procedure. Below query gives you the excat query executed by SQL Server.
T-SQL - Removing trailing zeroes
There are some cases when we have a value with trailing zeors to the left like '00089' but actually we want to consider only '89'.
The one solution to above problem is we can CAST it as INT. But since the value can be non-numeric also like '00089 MM:NN'. In this case CAST to INT will not work.
We will try to solve this problem using PATINDEX.
Below is the Code: