SQL Server Errors

All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.

Error Message: Msg 205, Level 16, State 1, Line 1 All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists. Severity level: 16. Description: This error message appears when you try to run a UNION, INTERSECT or EXCEPT query that has not an equal […]

An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as “” or [] are not allowed. Add a name or single space as the alias name.

Error Message: Msg 1038, Level 15, State 5, Line 1 An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as “” or [] are not allowed. Add a name or single space as the alias […]

Operation failed. The index entry of length %d bytes for the index ‘%.*ls’ exceeds the maximum length of %d bytes.

Error Message: Msg 1946, Level 16, State 3, Line 10 Operation failed. The index entry of length %d bytes for the index ‘%.*ls’ exceeds the maximum length of %d bytes. Severity level: 16. Description: This error message appears when you try to insert or update a row and an index entry exceeds the maximum allowed […]

The conversion from datetime data type to smalldatetime data type resulted in a smalldatetime overflow error.

Error Message: Msg 298, Level 16, State 1, Line 4 The conversion from datetime data type to smalldatetime data type resulted in a smalldatetime overflow error. Severity level: 16. Description: This error message appears when you try to convert a datetime value into a smalldatetime value, but this value is outside the range of valid […]

The IDENTITY function cannot be used with a SELECT INTO statement containing a UNION, INTERSECT or EXCEPT operator.

Error Message: Msg 1057, Level 15, State 5, Line 11 The IDENTITY function cannot be used with a SELECT INTO statement containing a UNION, INTERSECT or EXCEPT operator. Severity level: 15. Description: This error message appears when in a SELECT INTO statement that involves a UNION, INTERSECT, or EXCEPT operator, the IDENTITY function shall be […]

Index ‘%.*ls’ on table ‘%.*ls’ (specified in the FROM clause) does not exist.

Error Message: Msg 308, Level 16, State 1, Line 3 Index ‘%.*ls’ on table ‘%.*ls’ (specified in the FROM clause) does not exist. Severity level: 16. Description: This error message appears when you try to force the usage of a non-existing index. Consequences: The T-SQL statement can be parsed, but causes the error at runtime. […]

Cannot set or reset the ‘parseonly’ option within a procedure or function.

Error Message: Msg 1059, Level 15, State 1, Procedure, Line 0 Cannot set or reset the ‘parseonly’ option within a procedure or function. Severity level: 15. Description: This error message appears when you try to use the ‘parseonly’ option in a procedure or function. Consequences: The SQL statement cannot be parsed and further execution is […]

Cannot use index “%.*ls” on table “%.*ls” in a hint. XML indexes are not allowed in hints.

Error Message: Msg 309, Level 16, State 1, Line 1 Cannot use index “%.*ls” on table “%.*ls” in a hint. XML indexes are not allowed in hints. Severity level: 16. Description: This error message appears when you try to force the usage of an XML index in a hint. Consequences: The T-SQL statement can be […]

The NOLOCK and READUNCOMMITTED lock hints are not allowed for target tables of INSERT, UPDATE or DELETE statements.

Error Message: Msg 1065, Level 15, State 5, Line 15 The NOLOCK and READUNCOMMITTED lock hints are not allowed for target tables of INSERT, UPDATE or DELETE statements. Severity level: 15. Description: This error message appears when you try to run a INSERT, UPDATE, or DELETE statement in the transaction isolation level READUNCOMMITTED or use […]

Index “%.*ls” on table “%.*ls” (specified in the FROM clause) is disabled or resides in a filegroup which is not online.

Error Message: Msg 315, Level 16, State 1, Line 11 Index “%.*ls” on table “%.*ls” (specified in the FROM clause) is disabled or resides in a filegroup which is not online. Severity level: 16. Description: This error message appears when you try to force the usage of an index in a hint, but this index […]
Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |