Viewing 15 posts - 211 through 225 (of 1,396 total)
For exhaustive methods it's quicker to only look at odd numbers. There was a Youtube video a little while ago where they compared all different programming languages to determine which...
June 14, 2023 at 10:34 am
Ok thanks. Yeah maybe I misread this one. When there are spaces in object labels it causes flashbacks to a difficult job
June 7, 2023 at 12:52 pm
Is the QUOTENAME to make the sample data? 🙂
June 6, 2023 at 1:11 pm
Looking at the first picture above the ordering of the Hours doesn't seem clear. Is it ASCENDING by [Run Start Time]? In the output, when the System value equals 6,...
June 6, 2023 at 12:28 pm
Why settle a tie using query logic, what about a unique index? Some or one of those could be helpful. A table containing holidays to exclude could be useful too. ...
June 4, 2023 at 12:23 pm
Doh, well I'd like to edit my edit in the previous post. Instead of "Removed IN from WHERE clause" it should say "Removed IN from WHEN condition" or something like...
June 1, 2023 at 1:36 pm
Maybe add a boolean column to the partition
select *, v.grp,
[test33] = case when v.grp=1
...
June 1, 2023 at 12:16 pm
Thanks to ChatGPT for creating the temp table
DROP TABLE if exists #TempTable;
go
CREATE TABLE #TempTable
(
ID INT,
flag int,
...
May 31, 2023 at 1:17 am
For the first query ChatGPT-4 generated
WITH CompanyAverageRent AS (
SELECT c.CompanyId, AVG(p.Rent) AS AverageRent
FROM #Companies c
JOIN...
May 30, 2023 at 11:03 pm
What happens if/when there are gaps in the CreatedDate column for particular CustomerID's?
May 23, 2023 at 2:57 pm
additional JOIN's and CROSS APPLY's apply to the rectangle defined immediately above it (in order of appearance) within the FROM clause
May 21, 2023 at 1:43 pm
Thinking outside the box is part of the reason I can solve problems fairly quickly as I use approaches that are not always predefined.
Thinking inside rectangles is how I...
May 21, 2023 at 1:29 pm
The link Steve Collins posted is interesting. Got through it, and while I don't quite agree that stored procs create a strangler pattern, I do think in the high...
May 20, 2023 at 12:45 pm
Check out this video. The speaker gives a whole laundry list of reasons, a litany of epiphanies, on why SQL Server is not well suited for transaction processing. Instead, the...
May 18, 2023 at 6:06 pm
It seems you could use COUNT in the SELECT list. COUNT always returns an INT even if the FROM clause returns no rows
declare
@max_num ...
May 17, 2023 at 9:47 pm
Viewing 15 posts - 211 through 225 (of 1,396 total)