|
|
-
|
|
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 ...
|
|
-
|
|
There is a blog post about #TSQL CAST Conversion Error… give me the row please! where the posted showed some methods to identify the data where convertion error happens. Here are other approaches to identify the problamatic data. Consider the following ...
|
|
-
|
|
Often you see people complaining that although the file exists in the directory, the code throws an error Operating system error 2(The system cannot find the file specified.). Ok. The following need the file path to be specified in the code
1 Backup/Res...
|
|
-
|
|
My friend asked me to come up with very triky interview question which is not usually asked. I myself asked this question to some of candidates while interviewing. It is possible to to apply arithmetic operators + and - on date columns like Date+2, Date...
|
|
-
|
|
Pinal Dave, Blogger,Speaker,Evangelist and Author,in his blog posted a puzzle about SQL SERVER – A Puzzle – Swap Value of Column Without Case StatementConsider the following set of data USE tempdb
GO
CREATE TABLE SimpleTable (ID INT, Gender VARCHAR(10...
|
|
-
|
|
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...
|
|
-
|
|
Julian date is one of the ways to represent date in number format. It is a 7 digit number with first four digits represents the year and last three digits represents the number of days since the first day of that year. There can be many methods to conve...
|
|
-
|
|
As you know both CHAR and VARCHAR datatypes are used to store characters. While VARCHAR is preferred and used in many times to have data with varying length CHAR datatype is primarily used to have data with Fixed length. Also CHAR datatype will keep tra...
|
|
-
|
|
NULL. This is a magical word in Database programming. Here are some interesting facts about NULL in SQL Server.
1 NULL can be defined as absense of value, undefined, or the value which is unknown at this point of time.2 All datatypes can be defined with...
|
|
-
|
|
My Co-worker complained me that AVG function is not properly working in SQL Server whereas it works correctly in mysql. I immediately told him that AVG does the implicit convertion by default and the result may be wrong (based on datatype).
Consider th...
|
|