SQL Server Errors

Percent values must be between 0 and 100.

Error Message: Msg 1031, Level 15, State 1, Line 1Percent values must be between 0 and 100. Severity level: 15. Description:This error message appears when the specified percent value is not within the valid range of 0 through 100. Consequences:The SQL statement can be parsed, but cannot be executed and execution is stopped. Resolution:Error of […]

SET DATEFORMAT date order ‘mmy’ is invalid.

Error Message: Msg 2741, Level 16, State 1, Line 1SET DATEFORMAT date order ‘mmy’ is invalid. Severity level: 16. Description:This error message appears when an invalid date format was specified. Consequences:The SQL statement can be parsed, but cannot be executed and execution is stopped. Resolution:Error of the severity level 16 are generated by the user […]

SET DATEFIRST %1! is out of range.

Error Message: Msg 2742, Level 16, State 1, Line 1SET DATEFIRST %1! is out of range. Severity level: 16. Description:This error message appears when an invalid date format was specified. Consequences:The SQL statement can be parsed, but cannot be executed and execution is stopped. Resolution:Error of the severity level 16 are generated by the user […]

There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

Error Message: Server: Msg 109, Level 15, State 1, Line 6There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement. Severity level: 15. Description:This error message appears when you try to […]

Missing end comment mark ‘*/’.

Error Message: Msg 113, Level 15, State 1, Line 5Missing end comment mark ‘*/’. Severity level: 15. Description:This error message appears when for a potentially multi-lined comment /* no ending comment token */ was typed. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the severity level 16 are generated by […]

There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

Error Message: Server: Msg 110, Level 15, State 1, Line 6There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement. Severity level: 15. Description:This error message appears when you try to […]

The variable name ‘%.*ls’ has already been declared. Variable names must be unique within a query batch or stored procedure.

Error Message: Server: Msg 134, Level 15, State 1, Line nThe variable name ‘%.*ls’ has already been declared. Variable names must be unique within a query batch or stored procedure. Severity level: 15. Description:This error message appears when you try to declare a variable that has already been declared. Consequences:The SQL statement cannot be parsed […]

The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.

Error Message: Server: Msg 120, Level 15, State 1, Line 6The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns. Severity level: 15. Description:This error message appears when you try to INSERT a row into a table and there […]

The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.

Error Message: Server: Msg 121, Level 15, State 1, Line 6The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns. Severity level: 15. Description:This error message appears when you try to INSERT a row into a table and there […]

Cannot assign a default value to a local variable.

Error Message: Msg 139, Level 15, State 1, Line nCannot assign a default value to a local variable. Severity level: 15. Description:This error message appears when you try to assign a value to a variable when you declare it Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the severity level […]
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 |