Forum Replies Created

Viewing 15 posts - 1 through 15 (of 209 total)

  • Reply To: A Simple Choice

    Thank you to Tonie and Jeffrey for explaining this to me ... I was completely wrong!

  • Reply To: A Simple Choice

    Assuming that your table contained only 1 row as specified, I don't think the answer is correct.  I spun up a nonce table with exactly that data and the query...

  • Reply To: The Rank Window

    Er, the schema is in want of a column.

  • Reply To: A Strange Result

    Thank you Jeff - I'd never tried that in all my years since SQL Server V7.0

  • Reply To: A Strange Result

    I'm doubtless being inexpressibly dim but I don't know what "It depends on whether results are in the grid or text" means.

  • Reply To: Code Blocks

    I was reviewing a PR today and had a minor disagreement with the dev because I took exception to his failure to use braces (C#)

    if (myVar == otherVar)

    return true;

    instead of

    if...

  • Reply To: Code Blocks

    Personally I think the query compiler should mandate BEGIN END for this construction.

  • Reply To: Strange behaviour in wrapper script

    Thanks for your input everyone.  When I get a moment I'll check some of these but I agree that RETURN EXECUTE is a bit odd ...

  • Reply To: Strange behaviour in wrapper script

    Sorry, my bad.  I've updated the topic thus "there is no error message, but the updates and inserts inside the wrapped script are not executed."

  • Reply To: Why don't these two queries return the same data?

    Thanks to both of you.  I have amended the query using OUTER APPLY (which I've only rarely used before) and that works fine.

  • Reply To: Changing the PK - I

    Ah thank you Steve.  Every day is a school day, particularly for me - my lesson here is to read the actual error message!

    • This reply was modified 1 year, 3 months ago by  edwardwill.
  • Reply To: Changing the PK - I

    I don't agree with this.  I ran the code in my sandbox and it returned

    Msg 2749, Level 16, State 3, Line 6
    Identity column 'InvoiceID' must be of...
  • Reply To: Roles Across Schemas

    I don't use "tooling" - just SSMS and touch-typing for me.  I remain unconvinced by the arguments for aliasing, but as I'm 66 and retiring in a few months I'm...

  • Reply To: Roles Across Schemas

    frederico_fonseca wrote:

    standards - and for those that do work a lot on this and use tools to help with coding, putting the alias can be automatic, and expanding the columns...

  • Reply To: Roles Across Schemas

    Why write this:

    SELECT TOP 10 
    s.stateid,
    s.statecode,
    s.statename
    FROM webapi.states AS s;

    when you could save yourself some typing and write:

    SELECT TOP 10 
    stateid,
    statecode,
    statename
    FROM...

Viewing 15 posts - 1 through 15 (of 209 total)