|
|
-
|
|
Executing a t-sql statement with a convert function
convert(datetime, my_date_column) ,
threw an arithmetical overflow error with the message :
Message
Arithmetic overflow error converting expression to data type datetime. [SQLSTATE 22003] (Error 8115) The statement has......
|
|
-
|
|
To make the T-SQL function DATEADD more dynamic use variables. The example below, accepts an input parameter, in this case “4”.
All events older than 4 months from now will be deleted.
DECLARE @months int
SET @months = 4
DELETE FROM [Events] WHERE [EventDate]
Republished from http://www......
|
|
-
|
|
Table variables and Temporary tables are used interchangeably – but they were designed for different purposes.
Temporary tables were designed for storage and manipulation of temporal data.
Table variables were designed to return User Defined Function (UDF) datasets.
Which type should be used ?......
|
|
-
|
|
1) What types of JOINS exist?
Inner Joins
Outer Joins (LEFT JOIN, LEFT OUTER JOIN, RIGHT JOIN, RIGHT OUTER JOIN, FULL JOIN , FULL OUTER JOIN)
Cross Joins (aka Cartesian Join)
2) Where are JOINS used?
Joins are implemented in either the FROM or WHERE clause
3) Why use JOINS?
JOINS are use......
|
|
-
|
|
A regular question is how to transfer data from one table to another efficiently.
I'm including an example of one method. But as with all approaches - ensure you have relevant SQL Server BACKUP and RESTORE for easy rollback.
Keep in mind - the structure of the new table is defined by the SELECT s......
|
|
-
|
|
I’ve just completed a project at tennismatchodds which required the analysing probabilities of outcomes in the sport of tennis. An algorithm created the likely outcome of the event. A further requirement of the project was to calculate likely outcomes of the event, from different points an......
|
|