Viewing 15 posts - 196 through 210 (of 1,244 total)
My entry...
IF OBJECT_ID('tempdb..#TestData', 'U') IS NOT NULL
BEGIN DROP TABLE #TestData; END;
CREATE TABLE #TestData (
Id INT NOT NULL,
R INT NOT NULL...
November 1, 2018 at 2:32 pm
October 31, 2018 at 5:30 pm
October 30, 2018 at 10:52 am
October 29, 2018 at 2:40 pm
This will product the desired results without the need for temp tables or a quirky update...
WITH
cte_n1 (n) AS (SELECT 1 FROM (VALUES (1),(1),(1),(1),(1),(1),(1),(1),(1),(1)) n...
October 26, 2018 at 2:11 pm
If the requirement is that some table(s) not accept inserts or updates that refference inactive values, then my first impulse would be to create an "insteasd of" trigger that checks...
October 26, 2018 at 7:57 am
In addition to Gail's comments, you can can use OPTION(RECOMPILE) on the table variable query and the optimizer will actually come up with a more accurate row estimations.
October 25, 2018 at 1:58 pm
I wasn't sure what the "IF NOT...
October 15, 2018 at 5:20 pm
October 15, 2018 at 11:07 am
Viewing 15 posts - 196 through 210 (of 1,244 total)