Viewing 15 posts - 6,991 through 7,005 (of 59,102 total)
Excellent thanks. This clarifies a lot and I look forward to those articles.
It sounds like, after reading both posts (Jeff and Brian), that inserting data in the middle of...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 8:17 pm
Quick Follow Up Question: The two sets of addresses and two sets of contact info for each applicant are obvious cues to normalize and create tables for each.
But everything...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 7:39 pm
Heh... there actually is a way. 😉 I've presented the method to just a couple of PASS chapters and I'm working on some proposed articles for a "Stairway".
Now,...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 7:33 pm
DATEDIFF(mm,0,[Date]) calculates the number of month boundaries crossed (in effect, returns a count of months) since day "0", which is the 1st of January, 1900. That means that each date...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 4, 2020 at 5:25 pm
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
Viewing 15 posts - 6,991 through 7,005 (of 59,102 total)