Viewing 15 posts - 31 through 45 (of 812 total)
Good catch!
Thanks.
September 29, 2021 at 7:10 am
From your link:
Compression can allow more rows to be stored on a page, but does not change the maximum row size of a table or index.
So, the "Compression can allow...
September 10, 2021 at 7:22 am
Please, post an example with RANGE!
I tried this one, so the right answer is PARTITION BY:
SELECT SUM(object_id)OVER()
,SUM(object_id)OVER(PARTITION BY NULL)
FROM sys.objects
WHERE object_id < 100
May 31, 2021 at 7:35 am
I use this function with recursion and @top of 1000000 is enough for me, but I don't n know if it performs better:
-- by Carlo.Romagnano
CREATE FUNCTION dbo.fn_tally(@top INT)
RETURNS TABLE
AS
RETURN WITH...
April 22, 2021 at 7:52 am
Explanation doesn't match with the "pseudo correct" answer.
From documentation:
The "radix" method generally outperforms the other methods, especially for character vectors and small integers. Compared to quick sort, it is slightly...
April 14, 2021 at 7:17 am
Little typo: newletters vs new_letters
newletters<- c("q","w", "e", "r", "t", "y", "u", "i", "o", "p", "q", "w", "e" )
> which (new_letters=="q")
March 31, 2021 at 6:53 am
"In this code, the SET IMPLICIT TRANSACTIONS ON sets a @@trancount of 1. I am not sure why this occurs, but it means that after the COMMIT, there is still...
March 18, 2021 at 9:05 am
-- correct
declare @d tinyint = NULL
RAISERROR(' %s is the current value', 1, 0, @d)
-- incorrect
declare @d tinyint = 1
RAISERROR(' %s is the current value', 1, 0, @d)
March 9, 2021 at 9:58 am
You can avoid COALESCE with this code:
SELECT *
,LAG(CAST(b AS VARCHAR(10)),1,'N/A')over(ORDER BY a,b)
FROM (VALUES
('a',1)
,('b',2)
,('c',3)
,('d',4)
) AS V([a],)
-- P.S. I did not test for performance.
March 2, 2021 at 8:01 am
A little typo:
name, value, level0 type of schema, level0 value of dbo, level1type of table and level1name of dbo.Adverts.
level1name should be only the name of table without the schema.
June 23, 2020 at 7:40 am
That's right!
It's good to know.
Here's to force the minus precedence:
SELECT (-100.0)/(-100.0)*10.0
June 9, 2020 at 6:52 am
The increment also is out of transactions. So, rollback doesn't restore the original value.
Also, you can not remove the property IDENTITY from a column.
This adds the IDENTITY to a column:
ALTER...
June 1, 2020 at 7:32 am
Here states different:
A.difference(B) it's the same as A-B
April 8, 2020 at 6:59 am
This is not a correct answer. There's no -m flag. From the documentation, @@cursor_rows returns -m if the cursor is being asynchronously populated. That just means a negative value m is returned by...
March 30, 2020 at 7:05 am
Viewing 15 posts - 31 through 45 (of 812 total)