SQL Server Errors

Could not locate entry in sysdatabases for database ‘%.*ls’. No entry found with that name. Make sure that the name is entered correctly.

Error Message:Msg 911, Level 16, State 1, Line 1Could not locate entry in sysdatabases for database ‘%.*ls’. No entry found with that name. Make sure that the name is entered correctly. Severity level:16. Description:This error message appears when you try to access a database, that is not known on this SQL Server instance. Consequences:The SQL […]

Could not create constraint. See previous errors.

Error Message:Msg 1750, Level 16, State 0, Line 1Could not create constraint. See previous errors. Severity level:16. Description:This error message appears when as a result of a previous error a constraint cannot be created. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. Resolution:Error of the Severity Level 16 are generated by […]

Column ‘%.*ls.%.*ls’ is not the same data type as referencing column ‘%.*ls.%.*ls’ in foreign key ‘%.*ls’.

Error Message:Msg 1778, Level 16, State 0, Line 1Column ‘%.*ls.%.*ls’ is not the same data type as referencing column ‘%.*ls.%.*ls’ in foreign key ‘%.*ls’. Severity level:16. Description:This error message appears when you try to create a FOREIGN KEY constraint between columns of different data types. Consequences:The T-SQL statement can be parsed, but causes the error […]

The TABLESAMPLE clause cannot be used in a view definition or inline table function definition.

Error Message:Msg 478, Level 16, State 0, Procedure MyOrder, Line 5The TABLESAMPLE clause cannot be used in a view definition or inline table function definition. Severity level:16. Description:This error message appears when you try to use the TABLESAMPLE clause inside a view or inline table function. Consequences:The SQL statement cannot be parsed and further execution […]

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

Error Message:Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. Severity level:16. Description:This error message appears when you try to use subquery (correlated or not) that returns […]

Invalid ROWS value or REPEATABLE seed “%I64d” in the TABLESAMPLE clause for table “%.*ls”. The value or seed must be greater than 0.

Error Message:Msg 479, Level 15, State 0, Line 1Invalid ROWS value or REPEATABLE seed “%I64d” in the TABLESAMPLE clause for table “%.*ls”. The value or seed must be greater than 0. Severity level:15. Description:This error message appears when you try to use an invalid value for the ROWS or REPEATABLE option of the TABLESAMPLE clause. […]

Non-constant or invalid expression is in the TABLESAMPLE or the REPEATABLE clause.

Error Message:Msg 482, Level 15, State 2, Line 1Non-constant or invalid expression is in the TABLESAMPLE or the REPEATABLE clause. Severity level:15. Description:This error message appears when you try to use a non-constant invalid expression in the TABLESAMPLE or REPEATABLE clause. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. Resolution:Error of […]

Variables are not allowed in the TABLESAMPLE or REPEATABLE clauses.

Error Message:Msg 497, Level 15, State 1, Line 3Variables are not allowed in the TABLESAMPLE or REPEATABLE clauses. Severity level:15. Description:This error message appears when you try to use a variable in the TABLESAMPLE or REPEATABLE clause. Consequences:The T-SQL statement can be parsed, but causes the error at runtime. Resolution:Error of the Severity Level 15 […]

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, = or when the subquery is used as an expression.

Error Message:Msg 512, Level 16, State 1, Line 1Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. Severity level:16. Description:This error message appears when you try to use subquery (correlated or not) that returns […]

Cannot insert the value NULL into column ‘%.*ls’, table ‘%.*ls’; column does not allow nulls. %ls fails.

Error Message:Msg 515, Level 16, State 2, Line 9Cannot insert the value NULL into column ‘%.*ls’, table ‘%.*ls’; column does not allow nulls. %ls fails. Severity level:16. Description:This error message appears when you try to insert a NULL marker into a column for which the NOT NULL constrain exists. Consequences:The T-SQL statement can be parsed, […]