Each query we execute has an execution plan that is cashed. Once cashed if we run the query again it will return the results quicker……
If you are trying to find a table or a view based on a column name here is a piece of code that will be……
If you want to extract numbers all the numbers (8702000118) from the following string “BlaBla Hill is – 870-200-0118 abx” just use the code below:……
This will teach you how to format a phone number from 1234567890 to (123) 456-7890. SQL Server 2008: SELECT [Phone] AS [Phone Number] , ‘(‘+(SUBSTRING(Phone,1,3)+’)……
Here is a list of the different date formats that come standard in SQL Server as part of the CONVERT function. Tweet Tweet
If you are trying to split a comma delimited string there are number of option to do that. One of the easiest ways is to……
Source: http://www.midnightdba.com/Jen/2010/10/tip-over-and-partition-by/ Here’s a quick summary of OVER and PARTITION BY (new in SQL 2005), for the uninitiated or forgetful… OVER OVER allows you to……
If you would like to find the start and the end of the previous Quarter based of a date here is the t-sql code you……
If you would like to find out a Database restore, source and backup date you will need to execute the below script: SELECT [rs].[destination_database_name], [rs].[restore_date],……
If you would like to get only the latest record that is related to another record (Entity) here is one method of doing that by……