Viewing 15 posts - 316 through 330 (of 3,482 total)
case when Locale = 'h' then (lag(Score) over(order by Score)) end as Oppscore
CASE WHEN Locale = 'h' THEN ( LAG(score,1) OVER ( ORDER BY Score ) ) END AS OppScore
?
If...
July 22, 2022 at 8:56 pm
Any chance you could mock up some fake data that represents the situation you're trying to model and query? And an expected query result? It's hard to know how to...
July 22, 2022 at 2:24 am
I started to suspect the OS was screwy after a while because I'd never had near that much trouble installing. I should have done the smart thing and emailed myself...
July 14, 2022 at 3:53 pm
Would have sworn there was a handy article by Perry Whittle or Lynn Pettis that covers useful date functions, but I can't find it right now... but this one looks...
July 14, 2022 at 2:45 am
Okay, that was fun. Finally gave up and reset my install of Win10, and reinstalled all the software. apparently some settings somewhere went haywire, causing the SQL/Azure Data Tools install...
July 13, 2022 at 6:48 pm
Normally, you do this in the UI... either PowerBI or Excel... unless you don't want to ever see that data.
you can create a stored procedure and then use that as...
July 10, 2022 at 2:19 am
Is this a question lost in a time warp or something? SQL 2012 is lpretty much 10 years old and out of support or a while. So why would you...
July 8, 2022 at 9:52 pm
How long does it take? I'm just wondering, because this installer seems to park at the "loading..." screen forever and ever. (A good 10-15 mins?) Maybe i should start it...
July 7, 2022 at 3:22 pm
(Notes from the field: I worked in a place where they didn't know how to normalize... As a result, I was there for 8 months instead of maybe a week....
July 7, 2022 at 12:17 am
CAST('Action - 1. Analysing' AS DATE) END
'Action -1. Analysing' is a string that cannot be coerced to date. If that's supposed to be a column in your table, then wrap...
July 5, 2022 at 12:19 am
You mentioned a Fact table... you usually only have that kind of thing in a data warehouse. Where are you analyzing said data? Because the way you would answer this...
July 2, 2022 at 12:11 am
you need LEAD() to get the next row. See here
You'd put the PartNum in the OVER clause and then ORDER BY EffectiveDate
June 30, 2022 at 7:18 pm
Couldn't you just use NTILE() to split the file into a given number of pieces?
DECLARE @Tiles INT;
SELECT @Tiles = CEILING(COUNT(*)/10000)
FROM dbo.CovidData;
SELECT
bucketNo = NTILE(@Tiles) OVER (ORDER BY...
June 30, 2022 at 4:06 pm
If I were you, I would get out a whiteboard (or piece of paper) and draw / diagram this:
June 29, 2022 at 7:31 pm
Viewing 15 posts - 316 through 330 (of 3,482 total)