SQL Server Errors

Arithmetic overflow error converting expression to data type int

With SQL Server, how to avoid this error : “Arithmetic overflow error converting expression to data type int”. Let’s insert some data into a table using a stored procedure for example. Facing this SQL Server error message can be disturbing. Even if SQL conversion errors are classical ones, finding the

SQL Server

SQL Server Pivot query rows to columns

How to use the SQL Server Pivot query to change rows to columns with the SQL built-in function ? The SQL Server Pivot query can pivot lines to columns. What is the easy syntax of a PIVOT query? The PIVOT function is pivoting the lines into columns, in order to

SQL Server Errors

SQL Server error conversion from XML to NVARCHAR

How to convert XML into NVARCHAR with SQL Server? To avoid the SQL Server error conversion from XML to NVARCHAR. The exact message is “Implicit conversion from data type xml to nvarchar is not allowed. Use the CONVERT function to run this query.”. With SQL Server data, it is useful

SQL Server Index

How to list all SQL Server indexes?

How to list all SQL Server indexes? It can be very useful to display all database indexes. Indeed, to have an idea at a glance at how this SQL Server database is optimized with indexes, whether an index is A clustered or a non-clustered one. This query offers you a

SQL Server Strings

How to split a delimited text in SQL Server?

How to split a delimited text in SQL Server? The string to split can have a comma or a semicolon delimiter. Using an SQL Server query, you can cut a string compounded of text, delimited by commas, semicolons, tabulations, dash, underscore, or even dots. It can basically be any character

SQL Server Errors

Invalid object name SQL Server CTE Error

How to execute multiple SELECT queries on the same CTE? As a reminder, a CTE is a temporary object that only exists between its creation and the first time it’s used. It means it’s deleted right after the first query ran against the CTE. Indeed when querying the second time