Viewing 15 posts - 286 through 300 (of 26,487 total)
Expect to have to do lots of tweaking to the code to handle all the things that come up, though.
NULL / NOT NULL for each column (which...
December 6, 2019 at 4:18 pm
I don't think it helps that there are many, on certain websites (cough Stack overflow cough) that don't help the situation by answering the questions for these people,...
December 6, 2019 at 2:58 pm
It is possible, however unlikely, that when the query plan was recompiled after the index was created that the optimizer determined that it actually wasn't needed and found a different...
December 6, 2019 at 2:29 pm
Expect to have to do lots of tweaking to the code to handle all the things that come up, though.
NULL / NOT NULL for each column (which should always...
December 6, 2019 at 1:28 am
To start with the last part of your post, low resources. I am not sure if low resources would cause deadlocks, but at the same time not saying it couldn't. ...
December 5, 2019 at 11:53 pm
Since it isn't always possible to write your code to prevent deadlocks, you should write your code to trap for the deadlock error and retry the failed transaction. This sounds...
December 5, 2019 at 10:56 pm
Thanks, Scott, those are excellent points. I am considering them as we speak. In this case, the tables all seem to be quite similar (i.e., the app uses a...
December 5, 2019 at 10:35 pm
Correct. I do the same thing for an application where the user app does not have the direct ability to insert or update data in tables. This application uses stored...
December 5, 2019 at 8:59 pm
Create a stored procedure to create the lookup table. The create procedure would start looking like this:
CREATE PROCEDURE <schemaname>.<procedurename> [parmeter [, parameter]...]
WITH EXECUTE AS OWNER
AS
<procedure body>
You would...
December 5, 2019 at 8:43 pm
I have a stored procedure that run a number of update statements using table function to select 10% of the records based on the year the data was...
December 5, 2019 at 5:28 pm
If anyone is interested in a rather interesting problem has a look at this: https://www.sqlservercentral.com/forums/topic/table-function-returns-varying-number-of-records-for-an-update-statement
I gave up.
Looks like I was able to help the OP. Yea me!
December 5, 2019 at 4:45 pm
You would think with all the dynamic SQL I have to write I'd count the single quotes correctly. Try either of the set comments below, see which one works.
December 4, 2019 at 11:00 pm
I can't test the openquery part of your code but I am pretty sure that the double quotes are your problem. I also added a bit to your sp_executesql that...
December 4, 2019 at 10:46 pm
See what happens when you make the following change:
ALTER FUNCTION [dbo].[GetTenPercent_Moss]
(
@parentId int,
@sampleyear int
)
RETURNS TABLE
AS
RETURN
(
SELECT TOP (10) PERCENT
...
December 4, 2019 at 10:23 pm
I wonder whether I will be cast out from The Thread as a maverick grammar nutjob for suggesting that NSO would be a better abbreviation, given that 'verbal' means...
December 4, 2019 at 9:24 pm
Viewing 15 posts - 286 through 300 (of 26,487 total)