|
|
-
|
|
Consider the following CREATE TABLE statementscreate table #t1 (i int) -- Statement 1
create table .#t2 (i int) -- Statement 2
create table ..#t3 (i int) -- Statement 3
create table ...#t4(i int) -- Statement 4
How many are incorrect stateme...
|
|
-
|
|
Handling DATETIME values in the queries is often challenging due to various factors which include choosing wrong datatype(VARCHAR instead of DATETIME),formatting in sql,expressing values in regional specific format,removing time part,etc.
Well. Here is...
|
|
-
|
|
I have posted a blog post about Different ways to remove TIME part from DATETIME values where I have shown six different ways to remove TIME part. Some of the regular users posted some alternate methods. Here is the analysis of how long each method take...
|
|
-
|
|
When you write queries that involve datetime columns, it is often needed to remove time part from datetime value to compare only date part. An example would be, you have table called sales_details that has sales_date as one of the columns and you want t...
|
|
-
|
|
Pinal Dave (Blog|Twitter), Blogger,Author, Evangelist and Speaker, posted a blog post about Reseting Identity Values for All Tables. He has used the undocumented system stored procedure to perform this. As you know sp_MSForEachTable is undocumented and ...
|
|
-
|
|
As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to make use of the option “Search i...
|
|
-
|
|
I saw this question
"Date d = new SimpleDateFormat("MM/dd/yyyy").parse("22/44/2008") will return Nov 13, 2009 as the date! Really? 22 is what month?"
The code is written in Java and the user is surprised to see the result and wonders if 22 is a month.
...
|
|
-
|
|
Well. You can express numbers in scientific form. ExampleSELECT 2E
returns 2 SELECT 3E
returns 3
Now what does the following select statement return?SELECT 2E-3ETRY to answer this question without running it....
|
|
-
|
|
I have posted a question for July 2012 at Question of the month July 2012 - How does COALESCE(null,null+1,null) work? Did you know why the second query works without any error?
A NULL value can be of two types. Typed NULL and non-Typed NULL.
SELECT SUM...
|
|
-
|
|
27 then 28 else day_col+1 end
GO
Now Enable Statistics time and compare the time taken by each method SET STATISTICS TIME ON
print '======================================================'
Print 'Method 1 starts'
print '===============================...
|
|