SQL Server Errors

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 ORDER BY position number %ld is out of range of the number of items in the select list.

Error Message: Server: Msg 108, Level 15, State 1, Line nThe ORDER BY position number x is out of range of the number of items in the select list. Severity level: 15. Description:SQL Server allows to reference a column in the ORDER BY clause by its ordinal position in the final resultset. This message appears when […]

The column prefix ‘%.*ls’ does not match with a table name or alias name used in the query.

Error Message: Server: Msg 107, Level 16, State 3, Line 1The column prefix ‘t1′ does not match with a table name or alias name used in the query. Severity level: 16. Description:SQL Server allows to specify a table alias for each table involved in your query. Typically this is in the formSELECT < list >  […]

Must declare the variable ‘%.*ls’.

Error Message: Server: Msg 137, Level 15, State 2, Line 3Must declare the variable ‘@orderid’. Severity level: 15. Description:SQL Server allows to use variables in SQL scripts or statements. This error is raised when you refer to a variable without having it declared first.    Consequences:The SQL statement cannot be parsed and further execution is stopped. […]

Unclosed quotation mark before the character string ‘%.*ls’.

Error Message: Server: Msg 105, Level 15, State 1, Line nUnclosed quotation mark before the character string ‘%.*ls’. Severity level: 15. Description:This error message indicate a not correctly formatted string. Strings in SQL Server must always be enclosed in single quotation marks. If there are single quotation marks within the string itself, they need to […]

Line %d: Incorrect syntax near ‘%.*ls’.

Error Message: Server: Msg 170, Level 15, State 1, Line %dLine %d: Incorrect syntax near ‘%.*ls’. or:Server: Msg 102, Level 15, State 1, Line %dIncorrect syntax near ‘%.*ls’. Severity level: 15. Description:This error message appears when the parser encounters invalid syntax. Consequences:The SQL statement cannot be parsed and further execution is stopped. Resolution:Error of the […]
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 |