|
|
-
|
|
Arithmetic operators are used to perform arithmetic operations like addition, subtraction, multiplication and division. However the operators + ,- and ~ can also be used as unary operators to decide if a number is positive or negative. But we can have f...
|
|
-
|
|
In SQL forums, one of the memebers asked this question. "In the table a varchar column has values like '2.2020 30 4.0000', '2.20200 30 4.00', etc. When I pass a parameter with the value '2.202 30 4.0' , the above value should be returned as output. How ...
|
|
-
|
|
Pinal Dave is an inspiration for a large number of SQL Server professionals all over the world. He is a great teacher who knows how to explain any complex stuff in very simple words and examples that everyone understands. That is the reason why his blog is considered to be one of the best source of ......
|
|
-
|
|
I got a question in my personal forum this morning requesting help to read values from an XML column. My first reaction was “Well, there is an XQuery lab demonstrating this!”. However, after reviewing the existing XQuery labs, I realized there are no posts demonstrating this. Here is a simple exam......
|
|
-
|
|
One of the problems I came across while writing the partitioning chapter for my FILESTREAM book is that the partitioning does not work correctly with RANGE LEFT. It works as expected when using RANGE RIGHT. Something is wrong with RANGE LEFT and the problem exists in SQL Server 2008, R2 and Denali C......
|
|
-
|
|
We can use many aggregate functions with the OVER clause, however, we cannot use Distinct Counts in the OVER clause. I had a problem in which i have to count distinct records based on different groupings on columns.
Let me illustrate the problem. I hav...
|
|
-
|
|
Often you may come across a situation to calculate time values which are stored as numbers. There is a seperate TIME datatype to store time values starting from SQL Server 2008. But you might find that in earlier versions time values might be stored in ...
|
|
-
|
|
Both SET and SELECT clauses can be used to assign values to the variables. While SET works for a single variable, SELECT works for more than a variable. If you want to assign values to multiple variables in single shot, SELECT can be used.
SELECT serv...
|
|
-
|
|
Run the following code
declare @t table(i int unique)
insert into @t
select 1 union all
select null union all
select null
You will get the following error
Msg 2627, Level 14, State 1, Line 3
Violation of UNIQUE KEY constraint 'UQ__#A989971__3BD019979D26A3BB'. Cannot insert duplica......
|
|
-
|
|
I got Microsoft community contributor award! it seems like a great
program and I am happy to have received this award. Thanks readers and
forum members for being an active part of this one of its kind
community. I believe it’s best in the world and I hope the spirit of
learning and sha......
|
|