Viewing 15 posts - 1,471 through 1,485 (of 2,645 total)
It would help if you could post the full query in the thread with the DDL for the indexes on the tables in the query.
August 8, 2019 at 5:45 pm
A key lookup is used when all the columns the query needs are not contained in the index, the database engine will have to go to the clustered index (actual...
August 8, 2019 at 2:12 pm
You can write a Table Valued Function (tvf) as in the article you posted, I believe this may be more efficient than a scalar-valued function:
IF OBJECT_ID(N'dbo.tvfNORMALDIST', N'IF')...
August 8, 2019 at 12:54 pm
if you still want me to provide some data and/or results I get in Excell or the SQL I use to get the data then just let me know...
August 8, 2019 at 10:02 am
It is not just rounding in a single computation. When you have a set of floats, you also get skew in the set as a whole, either away from...
August 7, 2019 at 3:34 pm
Standard deviation is the square root of the variance
Yes it is, the article is incorrect when it states "The variance (s) is the square root of the standard...
August 7, 2019 at 3:01 pm
I know that floating-point numbers are approximate. The errors you are referring to would only apply to the least significant digits of the result. But all the OP wants to...
August 7, 2019 at 10:57 am
This is not the purpose of SQL. We are a database language; you really ought to be using a statistical package. You can write out the formula for the...
August 6, 2019 at 4:45 pm
If you know the mean (µ) and variance (sigma²) you can plot a normal p.d.f.
In t-sql the mean is AVG(), the variance is VAR()
It would be helpful...
August 6, 2019 at 3:39 pm
Unfortunately, this is a 2008 forum and so the IIF functionality will need to be converted to CASE statements if you're truly using 2008.
Sorry, I didn't read which forum...
August 2, 2019 at 2:47 pm
If you know the maximum number of rows for any Id in the table you could construct a query like this:
SELECT Id,
...
August 2, 2019 at 2:31 pm
Something like this?
;WITH CTE AS
(
SELECT DISTINCT T.ID
FROM @T T
)
SELECT *
FROM CTE
CROSS...
August 2, 2019 at 1:47 pm
Like so:
SELECT EmpName,
MAX(CASE WHEN row_num = 1 THEN Item END) AS item1,
MAX(CASE WHEN row_num = 2 THEN Item...
July 26, 2019 at 3:46 pm
As Alejandro Santana says, just make sure the recovery model is set to Simple.
July 26, 2019 at 2:31 pm
Viewing 15 posts - 1,471 through 1,485 (of 2,645 total)