Viewing 15 posts - 6,991 through 7,005 (of 59,098 total)
Fill factor only comes into play when the index is NEW or REBUILT. Basically, it is just telling SQL that the data is either changing frequently or the inserts...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 4:36 pm
Heh... Most people have a rule of "Normalize 'til it hurts then denomalize 'til it works". I disagree with that. My rule of thumb is "Normalize 'til it hurts... then...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 4:03 pm
Thanks for the feedback and you're welcome. The key now is, since you're the one that has to support the code, do you understand how it works? Especially the DATEDIFF/DATEADD...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 3:59 pm
I think either are acceptable, but I think one will have better performance. I am pretty sure "NOT NULL" is not sargable so you may have a performance hit...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 3:56 pm
Generally, I try to avoid all "IsPresent", "IsCurrent", "IsActive", and, for sure "IsInactive" and "IsNotCurrent" columns, etc, etc. The data tells it all.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 3:32 pm
Try this...
SELECT Name
,country
,avg_amount = AVG(amount)
...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 3:30 pm
Since your result set that shows what you want to display doesn't contain results that match with your sample data in the 3rd column, what are you looking for in...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 3:16 pm
Nothing like stating the obvious, Joe.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2020 at 4:29 pm
My solution was
select AllergyName,
MAX(CASE WHEN ScaleValue = 'Low' THEN ScaleStart else 0 end) AS [LowStart],
MAX(CASE WHEN ScaleValue = 'Low' THEN ScaleEnd else 0 end) AS [LowEnd],
MAX(CASE...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2020 at 2:47 pm
Lordy... there's a "bot" running with the handle of "Stanley" and it's posting spam every 5 minutes. Between that and another bot that was active only for a while, I'll...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2020 at 4:32 am
I played around with the query a little and added percentage columns.
The math works, but it seems to default to six decimal places. 100% - 100.000000. Is there a...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2020 at 1:53 am
Mine is similar but I took advantage of IIF. It still renders out as CASE expressions behind the scenes so no performance gain or anything like that. I also think...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2020 at 12:46 am
Your suggestion worked. Thanks. I am just getting the hang of this but will post the working formula even though there is probably a better way to do this.
CONVERT(DECIMAL...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2020 at 10:07 pm
Thank you both so much! I was trying to be cute and figure out how to use the PIVOT operation, but going back to the basics and using the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2020 at 10:04 pm
These probably shouldn't be "scripts". They should be stored procedures (possibly in a permanent "utility" database) and then you can do what Scott has suggested to keep things safe.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 2, 2020 at 5:49 pm
Viewing 15 posts - 6,991 through 7,005 (of 59,098 total)