Visual Studio 2019 Causes SSMS to Hang or Run Slowly

I recently noticed that my local development copy of SQL Server Manager Studio (SSMS, v12.0.5659.1) would sometime run very slowly and other times seemed just fine. This was typically when writing code. For example, running a query or attempting to modify an existing stored procedure would take up to a minute or more to appear. I searched and found others with similar issues but none of the resolutions worked for me. Then by chance I noticed that my Visual Studio 2019 (v16.67.6) was actively running a local web application project. As soon as I stopped that, SSMS would immediately return … [Read more...]

User Defined ReOrdering in a SQL Server Table

  Suppose you want to allow your users to re-order a set of rows in a SQL Server table. Once the user has defined the new order, you need to save that order in SQL Server so that you can re-display the rows in the new order. But how can you accomplish this? You probably added a new column to the target table appropriately named sort. But how do you update this sort column so that it can reflect the new order? Let's assume we have 3 rows as follows and we have ORDER BY sort in query so that they display as... IDNameSort 1Red1 2Blue2 3Red3 and then our user re-orders the … [Read more...]