Viewing 15 posts - 1,261 through 1,275 (of 7,614 total)
#5 is completely wrong approach. You should never use ISNULL() in a WHERE clause. Instead move the condition from the WHERE clause to the LEFT JOIN. You need to that...
September 24, 2021 at 3:27 pm
... All required indexed are defined ...
Can't just take your word for that, still need to see DDL for the tables, including all index definitions.
September 24, 2021 at 2:58 pm
You ran a comparison?
Would we need to? A single math calc vs iterating thru string generations and comparisons?
September 24, 2021 at 4:11 am
Sure, it's above; I posted it years ago, when this q was first asked.
Actually I should adjust it again, you only need to calc the very first Friday,...
September 23, 2021 at 10:29 pm
Just out of curiosity, what is the recovery model on the model db?
I'm wondering if the db got created then restored over ?!
September 22, 2021 at 9:50 pm
You don't need to iterate/loop thru values looking for 'Tuesday', and personally I wouldn't. I find all such code much harder to adjust later, and generally less efficient.
I guess you...
September 22, 2021 at 8:30 pm
September 22, 2021 at 5:12 am
Table IndexesRows in table Hints With or Without TF 610 ...
September 22, 2021 at 4:46 am
Sure, it's above; I posted it years ago, when this q was first asked.
Actually I should adjust it again, you only need to calc the very first Friday, from then...
September 21, 2021 at 10:55 pm
Fwiw in 2021. In the FROM clause use dbo.fnTally and CROSS APPLY (both twice) to hierarchically generate the first 7 days of each month. Then in the WHERE...
September 21, 2021 at 10:47 pm
I believe the calc should be:
CAST(((f.TOTFCST - f.TOTHIST) * 100.00) / f.TOTHIST AS decimal(5, 2))
I have no idea at all why you are subtracting 1 from the quotient in your...
September 21, 2021 at 10:43 pm
Fwiw in 2021. In the FROM clause use dbo.fnTally and CROSS APPLY (both twice) to hierarchically generate the first 7 days of each month. Then in the WHERE clause...
September 21, 2021 at 6:48 pm
If you add the clustering before you add the data, make sure that you use WITH(TABLOCK) on the INSERT INTO statement to help take advantage of "Minimal Logging", which...
September 21, 2021 at 6:47 pm
You need to cluster tables #SmallerRange and #LargerRange on the the JOIN columns: ( VID, IorO, OtherLocationID ). If those 3 column values are unique in one/both of the tables,...
September 21, 2021 at 6:21 pm
SELECT OBJECT_NAME(object_id) AS object_name, OBJECTPROPERTYEX(object_id, 'BaseType') AS object_type
FROM sys.sql_modules
WHERE definition LIKE N'%<string_you''re_looking_for>%'
ORDER BY 2, 1
September 20, 2021 at 12:41 am
Viewing 15 posts - 1,261 through 1,275 (of 7,614 total)