Executing commands in SQLCMD

  • Comments posted to this topic are about the item Executing commands in SQLCMD

  • Nice simple question, thanks Steve.

    ...

  • Bad Steve, where was the semicolon?! πŸ˜‰

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Nice, simple question, thanks Steve....

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    β€œlibera tute vulgaris ex”

  • Thom A - Thursday, August 24, 2017 1:24 AM

    Bad Steve, where was the semicolon?! πŸ˜‰

    Just hadn't typed it yet πŸ˜‰

  • Thanks Steve, it was very informative, like always.

  • Steve Jones - SSC Editor - Thursday, August 24, 2017 7:40 AM

    Thom A - Thursday, August 24, 2017 1:24 AM

    Bad Steve, where was the semicolon?! πŸ˜‰

    Just hadn't typed it yet πŸ˜‰

    They aren't mandatory yet. At least not yet not in most contexts - only some statements require that the preceding statement be terminated, and GO isn't one of them (in fact it's not even a statement).  I wonder when they will be mandatory in the sense that all statements must be terminated by a semicolon (so that, fo example a block has to be terminated by "; END" and if the end of the block is also the end of the statement that will have to be "; END;".)
    I susect that the "backwrd compatability" argument that MS regularly uses to avoid fixing various sillinessses in SQL Server will mean that semicolons won't become mandatory terminators for all T-SQL statements during my lifetime.

    Tom

  • Nice and simple question with a simple answer.  Thom, good observation on the semicolon.

  • TomThomson - Friday, August 25, 2017 5:41 AM

    Steve Jones - SSC Editor - Thursday, August 24, 2017 7:40 AM

    Thom A - Thursday, August 24, 2017 1:24 AM

    Bad Steve, where was the semicolon?! πŸ˜‰

    Just hadn't typed it yet πŸ˜‰

    They aren't mandatory yet. At least not yet not in most contexts - only some statements require that the preceding statement be terminated, and GO isn't one of them (in fact it's not even a statement).  I wonder when they will be mandatory in the sense that all statements must be terminated by a semicolon (so that, fo example a block has to be terminated by "; END" and if the end of the block is also the end of the statement that will have to be "; END;".)
    I susect that the "backwrd compatability" argument that MS regularly uses to avoid fixing various sillinessses in SQL Server will mean that semicolons won't become mandatory terminators for all T-SQL statements during my lifetime.

    It was deprecated a couple versions ago, but I don't remember when.  With the "minimum 2 versions" they could make them mandatory whenever they want. Nonetheless, I think it'll probably be a while.

  • Ed Wagner - Monday, August 28, 2017 5:40 AM

    It was deprecated a couple versions ago, but I don't remember when.  With the "minimum 2 versions" they could make them mandatory whenever they want. Nonetheless, I think it'll probably be a while.

    I wouldn't be surprised if it happens in SQL Server 2030 or something silly.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Ed Wagner - Monday, August 28, 2017 5:40 AM

    TomThomson - Friday, August 25, 2017 5:41 AM

    Steve Jones - SSC Editor - Thursday, August 24, 2017 7:40 AM

    Thom A - Thursday, August 24, 2017 1:24 AM

    Bad Steve, where was the semicolon?! πŸ˜‰

    Just hadn't typed it yet πŸ˜‰

    They aren't mandatory yet. At least not yet not in most contexts - only some statements require that the preceding statement be terminated, and GO isn't one of them (in fact it's not even a statement).  I wonder when they will be mandatory in the sense that all statements must be terminated by a semicolon (so that, fo example a block has to be terminated by "; END" and if the end of the block is also the end of the statement that will have to be "; END;".)
    I susect that the "backwrd compatability" argument that MS regularly uses to avoid fixing various sillinessses in SQL Server will mean that semicolons won't become mandatory terminators for all T-SQL statements during my lifetime.

    It was deprecated a couple versions ago, but I don't remember when.  With the "minimum 2 versions" they could make them mandatory whenever they want. Nonetheless, I think it'll probably be a while.

    Heh... especially when most of the MS stored procedures in Master and MSDB don't have it yet.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Monday, September 4, 2017 7:10 AM

    Ed Wagner - Monday, August 28, 2017 5:40 AM

    TomThomson - Friday, August 25, 2017 5:41 AM

    Steve Jones - SSC Editor - Thursday, August 24, 2017 7:40 AM

    Thom A - Thursday, August 24, 2017 1:24 AM

    Bad Steve, where was the semicolon?! πŸ˜‰

    Just hadn't typed it yet πŸ˜‰

    They aren't mandatory yet. At least not yet not in most contexts - only some statements require that the preceding statement be terminated, and GO isn't one of them (in fact it's not even a statement).  I wonder when they will be mandatory in the sense that all statements must be terminated by a semicolon (so that, fo example a block has to be terminated by "; END" and if the end of the block is also the end of the statement that will have to be "; END;".)
    I susect that the "backwrd compatability" argument that MS regularly uses to avoid fixing various sillinessses in SQL Server will mean that semicolons won't become mandatory terminators for all T-SQL statements during my lifetime.

    It was deprecated a couple versions ago, but I don't remember when.  With the "minimum 2 versions" they could make them mandatory whenever they want. Nonetheless, I think it'll probably be a while.

    Heh... especially when most of the MS stored procedures in Master and MSDB don't have it yet.

    Touche, sir. In fact, I don't know any of them that do...the last time I looked, anyway.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply