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 | 433
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 | 585
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 | 784
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 | 584
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 | 1087
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 | 588
-
mssql performance turning
Murugan Andezuthu Dharmaratnam | 01 April 2021 | 595
-
mssql group by id other column comma separated
Murugan Andezuthu Dharmaratnam | 12 March 2021 | 1952
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 | 1772
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 | 1883
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 | 1795
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 | 1909
-
mssql select into multiple variables
Murugan Andezuthu Dharmaratnam | 28 November 2020 | 1964
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 | 1866
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 | 1915
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 | 2863
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 | 1989
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 | 1908
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 | 1948
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 | 2193
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 | 1910
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 | 1913
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 | 2345
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 | 2614
how to replace a string in a column in mssql … CONTINUE READING
-
mssql rows to comma separated string
Murugan Andezuthu Dharmaratnam | 26 September 2020 | 2477
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 | 2400
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 | 2561
-
list of temp tables in sql server
Murugan Andezuthu Dharmaratnam | 23 September 2020 | 2215
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 | 2595
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 | 2518
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 | 2752
ms sql server function to convert from number to words … CONTINUE READING
-
mssql depth of a tree
Murugan Andezuthu Dharmaratnam | 10 September 2020 | 2755
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 | 2629
sql query to insert if item is not found else update the item … CONTINUE READING