Viewing 15 posts - 46 through 60 (of 1,244 total)
You might be interested in an interesting series of articles by Itzik Ben-Gan:
https://sqlperformance.com/2021/04/t-sql-queries/number-series-solutions-4
Ken, Thank you for posting this link.
April 22, 2021 at 1:03 pm
>> The point being that, at it's core, this is a math problem. Storing pre-calculated values makes about as much sense as storing multiplication tables. <<
I hate to tell...
March 30, 2021 at 5:58 pm
Back in the old days, we attend lookup tables for this kind of stuff. Since SQL is designed for looking up data in tables, instead of doing recursive loops...
March 29, 2021 at 5:49 pm
Understand completely. I really don't consider the rounding issue to be an error. Just mildly annoying. Please don't take anything I said as being critical !! ...
March 26, 2021 at 6:20 pm
Nice work, and a fun solution, Jason.
Just a couple of comments.
I'm curious if it would save CPU cycles is to make the interest rate per period a variable. ...
March 26, 2021 at 5:49 pm
Just one thought - you can simplify the calculations. I used 'generic' names - which you probably want to change to what they actually represent...but something like this:
And -...
March 25, 2021 at 8:26 pm
The conclusion is that when you are changing the SQL Service logon account to a domain account, make sure that the SPN's are registered for the respective domain account. Also,...
October 5, 2020 at 1:15 pm
EAV table introduce their own sets of problems. In my opinion, a better option would be to create new "1 to 1" tables, rather than add (and remove) columns to...
September 16, 2020 at 2:37 pm
Thank you SO much. These are indeed the results in the structure I need them. I'm going to research that syntax and see if I can teach myself why...
September 15, 2020 at 9:36 pm
I apologize. I'm using SQL Server 2017 Standard Edition.
That means you can use the new(ish) STRING_AGG() function... Give this a shot.
SELECT
CONCAT(
h.course_module_instance_xref_ident, N', ',
STRING_AGG(CONCAT(N'"', h.question_text,...
September 15, 2020 at 8:59 pm
Edit: When you say, "SQL Server may still opt to only assign the variable once.", are you indicating that SQL Server may not only get the order wrong...
September 2, 2020 at 7:02 pm
3. What would cause or allow SQL Server to ignore an explicit ORDER BY clause when a specific row goal has been established?
How would an ORDER BY or ...
September 2, 2020 at 5:45 pm
Erland - As written, you are absolutely correct. That said, it is, however, easily corrected by by simply adding TOP(N) and ORDER BY clauses. See test below...
No, I...
September 2, 2020 at 1:08 pm
Jeff, if you are going to suggest people to use dynamic SQL, at least show them code that is safe and robust. The construct
SELECT @sql =
September 2, 2020 at 12:31 pm
What the heck... I'm just going to post what I have... See what you think of this.
USE tempdb;
GO
--====================================================================================================================
-- Start by creating 1M rows of test data in...
August 27, 2020 at 10:30 pm
Viewing 15 posts - 46 through 60 (of 1,244 total)