Viewing 15 posts - 16 through 30 (of 821 total)
The default values for parameters are not stored anywhere in the DMVs.
This statement is incorrect
SELECT ProcName = pr.name
, ParamName = p.name
...
December 20, 2023 at 8:18 am
Typo in answers: sys.modules is wrong, as it stated in the explanation: sys.sql_modules.
December 20, 2023 at 8:09 am
I didn't see the dbo schema before OPENJSON.
So the answer is correct, but not the explanation.
The query fails not because of compaibility level, but because of dbo schema before OPENJSON.
SELECT...
September 25, 2023 at 9:15 am
To select all rows from CustomerLeft change join precedence by parentheses:
SELECT *
FROM dbo.CustomerLeft AS cl
LEFT JOIN (dbo.CustomerContact AS cc
INNER JOIN dbo.EmailDomain AS ed...
July 31, 2023 at 10:34 am
"All roads lead to Rome!" we say in Italy. It depends on your case.
July 19, 2023 at 8:59 am
For Memory optimized premium-series the maximum is 64.
June 7, 2023 at 2:18 pm
Sorry folks, but the QoD submission some how went wrong.
This was the original explanation
TL;DR; Put a ISNULL around the SUM to ensure a numeric value is always provided, even...
April 24, 2023 at 1:00 pm
I think that the question is bad worded! So, the sentence "The software using the outcome of the code would always expect a numeric value" should be "The software doesn't...
April 24, 2023 at 7:40 am
I use this feature a lot, see the following example:
declare @t table (i int identity primary key, name sysname)
declare @i int = 1
,@name sysname
insert into @t
select TOP(10)...
April 20, 2023 at 6:55 am
I get it right, but I admit that the question is a little confusing: the value of 4 is the 3rd bit (starting from position ZERO, 2 is the right...
March 15, 2023 at 10:13 am
I think that ROLLBACK doesn't return any message.
March 13, 2023 at 2:45 pm
In the explanation, to be precise, I would change "where the first number is not a 9"
with "where the first char is not a 9"
November 23, 2022 at 11:57 am
Good catch!
It is Interesting that NULL never has a BaseType, also if you cast it to a defined type (e.g. INT).
SELECT *
,LEN(V.a)
,dataLENgth(V.a)
,SQL_VARIANT_PROPERTY(V.a, 'BaseType')
FROM (VALUES
(N'1')
,('2')
,('3')
,(NULL)
) AS...
November 18, 2022 at 8:00 am
Try this (adjust for your needs), then execute the output script:
set nocount on
select DISTINCT 'exec sp_helptext ' AS '--','[' + o.name + ']' AS [ ],CASE OBJECTPROPERTY(o.id,'ExecIsTriggerDisabled')...
September 7, 2022 at 11:28 am
Viewing 15 posts - 16 through 30 (of 821 total)