MSSQL Articles
-
MS SQL Server stored procedure slowing down over time and then speeding up again after opening and saving
Murugan Andezuthu Dharmaratnam | 20 March 2024 | 502
Experiencing with MS SQL Server stored procedure slowing down over time and then speeding up again after opening and saving … CONTINUE READING
-
cursor to loop through records in mssql database
Murugan Andezuthu Dharmaratnam | 12 December 2023 | 644
While working with a SQL database you want to create a cursor to loop through records in a table. Here is an example for the same. lets loop though a table named Country with columns Name and ModifiedBy, the sample code below can help you get started. … CONTINUE READING
-
backup MSSQL database using sqlpackage
Murugan Andezuthu Dharmaratnam | 26 September 2023 | 856
Execute the script to backup the database from the command prompt using sqlpackage. … CONTINUE READING
-
mssql stored procedure create read update delete into database table
Murugan Andezuthu Dharmaratnam | 11 May 2023 | 686
sample mssql stored procedure create read update delete into database table. Stored procedures in MSSQL for CRUD operations are not just about performing basic database functions. They are about ensuring that these operations are performed in a way that is efficient, secure, and in line with the best practices of database management. As businesses continue to rely heavily on data, the importance of well-crafted stored procedures in managing this data cannot be overstated. … CONTINUE READING
-
Microsoft sql server naming conventions best practices
Murugan Andezuthu Dharmaratnam | 09 May 2023 | 1189
Explore best practices for SQL Server naming conventions. Discover the importance of consistency, clarity, and organization in database object naming for optimal database management. … CONTINUE READING
-
mssql useful functions
Murugan Andezuthu Dharmaratnam | 04 April 2021 | 649
-
mssql performance turning
Murugan Andezuthu Dharmaratnam | 01 April 2021 | 672
-
mssql group by id other column comma separated
Murugan Andezuthu Dharmaratnam | 12 March 2021 | 2017
How to use group by clause with comma-separated column values in ms sql. I have a table … CONTINUE READING
-
mssql comma separated string to rows
Murugan Andezuthu Dharmaratnam | 11 March 2021 | 1835
how to convert a comma separated string to individual rows in mssql … CONTINUE READING
-
mssql query to list tables where new rows has been inserted updated or deleted
Murugan Andezuthu Dharmaratnam | 05 February 2021 | 1974
sql query to find list of table with insert updated or delete in the last one hour … CONTINUE READING
-
mssql how to alter column length from max to specific value without dropping the table
Murugan Andezuthu Dharmaratnam | 22 January 2021 | 1862
I have a table named Purchase with several columns including PurchaseOrderNumber and PurchaseOrderLine with column data type nvarchar(max) I would like to change the data type to nvarchar(64) without dropping the table. … CONTINUE READING
-
mssql how to join two tables by multiple columns
Murugan Andezuthu Dharmaratnam | 18 January 2021 | 2001
-
mssql select into multiple variables
Murugan Andezuthu Dharmaratnam | 28 November 2020 | 2031
sql server select columns into multiple variables from a table … CONTINUE READING
-
mssql how to get the previous row and next row value using select statement
Murugan Andezuthu Dharmaratnam | 27 November 2020 | 1926
mssql how to get the previous row and next row value using select statement … CONTINUE READING
-
sql server get identity value before insert
Murugan Andezuthu Dharmaratnam | 27 November 2020 | 1981
mssql how to get the current identity of a table before insert statement … CONTINUE READING
-
ssms error script generation failed click on help for known solutions
Murugan Andezuthu Dharmaratnam | 09 November 2020 | 2942
ssms error/exception script generation failed, click on help for known solutions. I am getting this error while I was trying to take a backup of the database using generate script … CONTINUE READING
-
mssql query to remove duplicate from a table
Murugan Andezuthu Dharmaratnam | 03 November 2020 | 2045
how to remove duplicate from a table using mssql query … CONTINUE READING
-
mssql select all if the where clause parameter is null or empty
Murugan Andezuthu Dharmaratnam | 23 October 2020 | 1977
In an MSSQL stored procedure, I am passing the Name parameter how to select all if the name parameter in the where clause is null … CONTINUE READING
-
mssql how to use exists in select list
Murugan Andezuthu Dharmaratnam | 18 October 2020 | 2019
How to use EXISTS in a select statement where you want to return a boolean column … CONTINUE READING
-
mssql how to filter from select where in list only if the list is not null
Murugan Andezuthu Dharmaratnam | 15 October 2020 | 2259
mssql how to filter from select where in list only if the list is not null or how to handle empty IN clause parameter list in mssql. … CONTINUE READING
-
mssql check if the output from select returns empty or null
Murugan Andezuthu Dharmaratnam | 15 October 2020 | 2002
mssql how to check if the output from select returns empty or null … CONTINUE READING
-
msql how to copy the result from select statement into a temp table
Murugan Andezuthu Dharmaratnam | 15 October 2020 | 1984
SQL script to copy the result from the select statement into a temp table. Please note that the temporary table is automatically created for you. … CONTINUE READING
-
mssql how to pass user defined table type to stored procedure from ssms
Murugan Andezuthu Dharmaratnam | 15 October 2020 | 2443
from sql server management studio how do I pass a parameter of type user defined table type to a stored procedure … CONTINUE READING
-
mssql replace string
Murugan Andezuthu Dharmaratnam | 26 September 2020 | 2676
how to replace a string in a column in mssql … CONTINUE READING
-
mssql rows to comma separated string
Murugan Andezuthu Dharmaratnam | 26 September 2020 | 2538
how to convert multiple rows to comma-separated string in mssql … CONTINUE READING
-
mssql exception Operand type clash dbo.type_name1 is incompatible with dbo.type_name2
Murugan Andezuthu Dharmaratnam | 24 September 2020 | 2459
mssql exception Operand type clash: dbo.type_name1 is incompatible with dbo.type_name2 … CONTINUE READING
-
mssql update from select inner join
Murugan Andezuthu Dharmaratnam | 23 September 2020 | 2651
-
list of temp tables in sql server
Murugan Andezuthu Dharmaratnam | 23 September 2020 | 2271
There are a couple of ways you can find the list of temporary tables in sql server. … CONTINUE READING
-
mssql create temp table
Murugan Andezuthu Dharmaratnam | 23 September 2020 | 2684
Creating a temporary table in mssql is one of the easiest things to do. You can use the same syntax as creating a table, the only difference prepend a # to the table name … CONTINUE READING
-
mssql exception subquery returned more than 1 value
Murugan Andezuthu Dharmaratnam | 15 September 2020 | 2577
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. … CONTINUE READING
-
mssql convert from number to words
Murugan Andezuthu Dharmaratnam | 10 September 2020 | 2812
ms sql server function to convert from number to words … CONTINUE READING
-
mssql depth of a tree
Murugan Andezuthu Dharmaratnam | 10 September 2020 | 2813
we will write a function to find the depth of a tree. Depth of node N in the tree is the length of the path from the root of the tree to node N … CONTINUE READING
-
mssql insert if not exist else update
Murugan Andezuthu Dharmaratnam | 29 August 2020 | 2697
sql query to insert if item is not found else update the item … CONTINUE READING