Viewing 15 posts - 2,386 through 2,400 (of 59,067 total)
@Raja mssql ,
This is meant as a friendly but serious suggestion... IF you even think that you're experiencing "SQL Injection" and YOU are asking these types of questions on a...
November 23, 2022 at 3:28 pm
p.s. This would make a great DA whiteboard interview question... if the candidate only comes up with the solution to the exact problem, you might want to consider someone else....
November 23, 2022 at 2:53 pm
Just in case anyone wonders what I'm going on about, the original question is a "data analysis" question.
Yep. It can be solved without using a series of dates (and Peter's...
November 23, 2022 at 2:51 pm
-- swePeso solution
WITH cteData(StudentId, delta, rnk)
AS (
SELECT StudentId,
...
November 23, 2022 at 2:19 pm
jignesh209 ,
Jeffrey must've gotten busy. Apologies for the delay. Here's the code that will answer the question that you asked.
SELECT StudentId
FROM #Student
...
November 23, 2022 at 2:20 am
Ok, Jeffrey... the Op posted some good test data. I'll give you the honors for providing the solution.
November 23, 2022 at 1:42 am
Yeah, but in the actual question the OP asks for those students that turned in the assignment for all dates.
Sorry... I was in the process of changing my reply...
November 23, 2022 at 1:35 am
But to just identify the students that did submit on every day - all you need is the number of days to match. Any student that has a...
November 23, 2022 at 12:48 am
Gosh... I hope you didn't take it the wrong way. It was meant as praise with the NOT referring to the critical symbol used in this great question.
November 23, 2022 at 12:46 am
BTW and just to be sure, if you're enabling change tracking for some legal reason, it won't hold up in court.
November 22, 2022 at 10:39 pm
Also, Jeff could you explain a little about the (TABLOCK) hint? Also, " OPTION (MAXDOP 1) --Keep parallelism from messing up the order"?
Sure...
About the WITH (TABLOCK)... it's being used...
November 22, 2022 at 10:37 pm
Although this sounds like a strange question, why are you trying to check something to see if it's a date? If you intend to CONVERT it without having a failure,...
November 22, 2022 at 10:16 pm
You do need an outer join with the dates students are expected to have turn-ins in order to accommodate a very naughty class that has conspired with each other where...
November 22, 2022 at 7:12 pm
Jeff's code seems to generate primary keys and produces the correct output afaik. Creating foreign keys should be straightforward for the OP. The split could be accomplished with OPENJSON...
November 22, 2022 at 7:09 pm
Viewing 15 posts - 2,386 through 2,400 (of 59,067 total)