Forum Replies Created

Viewing 15 posts - 16 through 30 (of 819 total)

  • Reply To: The Upgraded Procedure part 2

    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...

  • Reply To: The Left Joins

    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...
  • Reply To: More OUTER APPLY

    "All roads lead to Rome!" we say in Italy. It depends on your case.

  • Reply To: Max Managed Instance CPUs

    For Memory optimized premium-series the maximum is 64.

  • Reply To: Summing a BIT column with a numeric as the outcome

    Tonie Huizer wrote:

    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...

  • Reply To: Summing a BIT column with a numeric as the outcome

    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...

  • Reply To: Swapping values of variables

    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)...
  • Reply To: Decoding Set Options

    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...

  • Reply To: Dropping One Table

    I think that ROLLBACK doesn't return any message.

  • Reply To: Backup Permissions

    In my browsers (edge & firefox)

    1

  • Reply To: Searching Strings

    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"

  • Reply To: The SQL Variant Types

    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...
  • Reply To: Saving Labor

    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')...
  • Reply To: Restoring a Certificate

    What's the syntax for "LOAD CERTIFICATE"? I cannot find it on BOL.

    I saw that CREATE CERTIFICATE or ALTER CERTIFICATE loads the certificate from a file.

  • Reply To: EXCEPT

    Jason- wrote:

    *** sorry for the spoilers; but my comment didn't make sense to me without them ***

    I debated with myself between "Zero records" and the more comprehensive "Returns distinct rows...

Viewing 15 posts - 16 through 30 (of 819 total)