Skip to main content

New answers tagged

0 votes

SQL Server Management Studio "Key cannot be null" error when giving a specific user permissions on Stored Procedures

The problem was that the stored procedures had Writes written into them, and the user was a Read Only account. This error doesn't really point to that, but make sure the user has permissions to ...
LYNITS's user avatar
  • 1
3 votes

Trouble with slow stored procedure performance on 35M rows with CTE/Temp table

This is a classic Kitchen Sink Query. While you could add OPTION (RECOMPILE) as a quick fix, this comes at a cost of recompiling on every run. Instead, you should build a dynamic query. Don't forget ...
Charlieface's user avatar
  • 13.7k
0 votes

Call a stored procedure from a trigger

Different names for defining and calling the procedure would cause a problem. Has anyone noticed that sp-set-comment_count and sp_set-comment_count are different? After the sp, one has an underscore ...
Edward LeBlanc's user avatar
0 votes

Conditional update

There is a disadvantage in this approach: what if you change parent table not by this stored procedure but by other means? Another stored procedure or even direct update statement? The better solution ...
White Owl's user avatar
  • 876

Top 50 recent answers are included