Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

Common SQL Server Errors

From Wiki

Revision as of 18:00, 12 April 2011 by SQLDenis (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents [Hide]

Info

Below is a list with the most common errors that you will encounter in SQL Server. Each link has code that shows how to get the error, explained is why you get the error and what you can do to eliminate the error message. The error message will be shown in several languages


Primary Key Errors

Cannot define PRIMARY KEY constraint on nullable column in table
Violation of PRIMARY KEY CONSTRAINT Cannot insert duplicate key in object

Integer Data Types

Operand data type bit is invalid for min operator
Operand data type bit is invalid for max operator
Syntax Error Converting The Varchar Value To A Column Of Data Type Int
Arithmetic overflow error converting IDENTITY to data type int

Tables

Columns

Cannot insert the value NULL into column, table; column does not allow nulls. INSERT fails

Names

Dates

The conversion of a varchar data type to a datetime data type resulted in an out-of-range value
The conversion of a varchar data type to a smalldatetime data type resulted in an out-of-range value

SELECT

A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations

UPDATE

Cannot update a timestamp column


Linked Servers and Distributed Queries

OPENROWSET/Ad Hoc Distributed Queries Disabled




Contributed by: --SQLDenis 16:39, 21 August 2010 (GMT)

793 Rating: 3.2/5 (29 votes cast)