Forum Replies Created

Viewing 15 posts - 286 through 300 (of 328 total)

  • RE: Converting to XML

    Toreador (3/31/2016)


    George Vobr (3/30/2016)


    Try this:

    SELECT TRY_CONVERT(XML, 'NULL');

    The others I understand, but not this one!

    Hi Toreador

    It just shows that the result with the NULL is the same as 'NULL', nothing more.

    Sincerely...

  • RE: Converting to XML

    Thanks Steve for an interesting question. I have tried a variant, the result of which I couldn't answer without running the code in SSMS. Try this:

    SELECT TRY_CONVERT(XML, NULL);

    SELECT TRY_CONVERT(XML, 'NULL');

    SELECT...

  • RE: Unique Constraints

    Thanks for a good explanation and an interesting reference link.

  • RE: Row Level Security Updates

    The question is imprecisely worded. In the question does not mention that the bsmith user has rights to insert/update the table.

    Last time it was there.

  • RE: The SIGN

    sknox Posted Today @ 1:22:41 PM

    Good question, but the explanation is wrong on one point:

    The MIN() and MAX() functions are aggregates, therefore the NULL is eliminated.

    is not true.

    The reason...

  • RE: Error Assitance

    rcooper 78099

    Posted 3/22/2016 9:56:36 PM

    Msg 156, Level 15, State 1, Line 16

    Incorrect syntax near the keyword 'from'.

    Into Your original code, I added some notes.

    Select

    pc.accountnbr 'account number',

    qf.description...

  • RE: The Email Mask

    Thanks Steve, that you teach us by small steps to learn about the Dynamic Data Masking. On 03/08/2016 it was about masking data type varchar. There was a reference...

  • RE: QOTD Truncating Identity

    Thank you for this interesting question. After TRUNCATE TABLE is the table empty. DBCC CHECKIDENT on an empty table returns null.

    USE TestDB;

    GO

    CREATE TABLE Audit_Logins (ID INT IDENTITY, Name varchar(10));

    SELECT *...

  • RE: SQL query

    Thanks for the interesting question Mohammad. Query result is better seen from this auxiliary script:

    DECLARE @emp TABLE ( id INT );

    INSERT INTO @emp VALUES ( 1 ),( 2 ),( NULL...

  • RE: Equality on Nullable Columns

    Thank you for your useful question and good explanation. A similar instructive example

    is shown in this ref: https://msdn.microsoft.com/en-us/library/ms188048.aspx

  • RE: T-SQL COALESCE

    Interesting question, thanks for excellent explanation and comprehensive reference.

  • RE: DBCC Error 6

    An interesting question, which can be interpreted differently, thanks. It is quite unfortunate

    that even this piece isn't critical to the puzzle https://support.microsoft.com/en-us/kb/926070

  • RE: JOIN HINTS

    Thank you Uwe for this interesting question, very good explanation and the links.

    I learned today something new.:-)

  • RE: What's the Length?

    A really interesting question , thanks Umer . But just simple complicated? 😉

    DECLARE

    @max-2 AS NVARCHAR(MAX) = ''

    , @Var AS VARCHAR(4000) = 'ABCabc123';-- Varchar instead Nvarchar --

    SET @max-2 =...

  • RE: The Lonely Count

    Useful and interesting question, thank you Steve.

    The same result for i may give also this script:

    SELECT

    MyID

    , COUNT(*) OVER (PARTITION BY '') AS i

    -- OVER (PARTITION BY '') is the same...

Viewing 15 posts - 286 through 300 (of 328 total)