Exception handling or Error handling in SQL Server is a process of handling errors during execution of a Stored Procedure or a Trigger. It has similarities with other programming language exception ...
Ever wondered how you can convert data from rows to columns in SQL Server. We are talking about an SQL query, which will transform records from multiple rows into columns. Using SQL Server PIVOT, ...
An SQL Server Stored Procedure is a logical collection of statements or queries packaged together to perform a particular task, repeatedly. You do not have to write the statements repeatedly and it ...
In our previous article, we have described the functionalities of CHARINDEX (link) and we have briefly described the use of SQL Server SUBSTRING function too. A SUBSTRING function will extract a part ...
While working with SQL Server, often a question comes to my mind, is what version of SQL Server am I running. How do I know if it has a latest service pack or an outdated one? These queries become ...
SQL Server “DATE” and “DATETIME” data types store date and time values in a table. However, managing these values can sometimes be little difficult, especially if the value saved is “1900-01-01”. And ...
While managing an Inventory management System in an organization, we came across a situation where we had to perform bulk upload in a table in SQL Server. Bulk upload requires inserting multiple rows ...
The primary use of an SQL Server CHARINDEX function is to find the first or starting location of an expression or characters in a given string. To make it simple, it is like searching a specified ...
While going through the articles in this blog, you must have noticed a section below every post, which shows a list of “Related Articles”. It shows a minimum of 10 articles that relates to the ...
Duplicate rows in tables can be very annoying for DBA’s and programmers, as it raises many uncomfortable questions about the authenticity of data in a database. The matter gets worst when company ...