Forum Replies Created

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

  • 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, 1 month 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...
  • Reply To: The JSON Table

    Which JSON related function returns a table?

    The question suggests a singular answer.  The best and most correct singular answer is, surely, OPENJSON().

  • Reply To: Why do my queries lose connection?

    It's been mentioned to me that it might be a by-product of the PC going into stand-by mode; previously I've merely locked my PC overnight or when I'm away from...

  • Reply To: Use a flag, or calculate, to retrieve counts

    Jeff Moden wrote:

    Steve Collins wrote:

    Imo it depends on whether or not Approved is exactly equivalent to Taken.  Could a user be officially approved and yet not take the day?  If there's an...

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