Viewing 15 posts - 61 through 75 (of 206 total)
Just out of interest... is this an update proc or a select proc?
It uses the recursive CTE to populate some memory tables, which are then used in a succession...
March 12, 2020 at 11:26 am
Thanks everyone. I agree about not using PRINT statements, but I was not planning on adding this to the production code, just during the debugging process. The reason I want...
March 12, 2020 at 11:04 am
Thanks for that - however, the question was pretty vague, and I believe that a perfectly valid answer to the question that was posed is PERCENTILE_DISC.
February 14, 2020 at 3:19 pm
From the docs:
For example, PERCENTILE_DISC (0.5) will compute the 50th percentile (that is, the median) of an expression.
So I think you should have allowed this, given that the question simply...
February 14, 2020 at 11:40 am
Ahhh, I smell an upcoming question where the single and double quotes are changed
SPOILER ALERT
December 20, 2019 at 11:25 am
Strictly the first answer is also correct, I think, though less streamlined.
November 29, 2019 at 12:01 pm
Thanks Jonathan AC Roberts. In fact there was originally a key such as you suggest but it disappeared in a cut 'n' paste job. The tables were created purely for...
November 14, 2019 at 3:40 pm
Thank you very much Grant. A very useful and comprehensive answer that chimes with my much more limited experience (only 25 years a dev!) and also with my innate caution...
November 14, 2019 at 2:52 pm
I agree with all the answers above, apart from Stewart Campbell who not only found it "easy" but apparently has a version of SQL Server that works differently from everyone...
September 27, 2019 at 11:26 am
If there were any need to persist this, then I'd agree. However, the script is merely to identify a set of users for later deletion. The circumstances which have given...
September 19, 2019 at 12:38 pm
Ah thanks Thom. I've already replaced the CTE with a table variable (as it turns out I need to reference it multiple times in a much more detailed batch) and...
September 19, 2019 at 12:12 pm
Could you provide a link to an authoritative resource, please?
December 21, 2018 at 3:28 am
I hadn't come across this function, but I confess that I struggle to understand the utility of it. If you amend the SELECT statement thus
December 6, 2018 at 2:14 am
Viewing 15 posts - 61 through 75 (of 206 total)