Forum Replies Created

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

  • Reply To: The SQLCMD GO

    Carlo Romagnano wrote:

    Sorry for [semi]colon 🙂

    It's all right for error, because GO is a batch separator: @x is declared in the first batch and not in the second. It's the same...

  • Reply To: The SQLCMD GO

    Carlo Romagnano wrote:

    A semicolumn is missing after the two exclamation mark.

    Here's from BOL:

    Supported SQLCMD Syntax

    The Database Engine Query Editor supports the following SQLCMD script keywords:

    [!!:]GO[count]

    Except that's a colon, not a semi-colon...

  • Reply To: The SQLCMD GO

    IMHO wrote:

    Yeah, definitely in SQLCMD mode.  I use it alot. I tried

    !! GO

    as well.

    Confirmed. I went ahead and tried the same as you. In SSMS you get...

    • This reply was modified 1 year, 3 months ago by  Rune Bivrin.
  • Reply To: The SQLCMD GO

    IMHO wrote:

    I get an error when I use !!GO:

    'Go' is not recognized as an internal or external command,
    operable program or batch file.

    But i can use:

                

    March 13, 2020 at 3:13 pm

    #3734093

  • Reply To: The SQLCMD GO

    DOH!

    I read that article right up to the line preceeding the one with the pertinent information.

    Now I must finish my coffee!

  • Reply To: Capitalize the name

    Good question! Can we expect one for proper next? 🙂

  • Reply To: The Triple Update

    Jeff Moden wrote:

    Heh... I wonder how many people actually got this question right without having to run the code?

    I've been using a related technique to emulate STRING_AGG, so it wasn't that...

  • Reply To: The Triple Update

    Interesting, but I'd be wary of using it. In a multi-row update, the result is pretty much undefined, unless all the rows are updated to the same value. And in...

  • Reply To: Returning Info from Stored Procedures

    dotathinker wrote:

    How about temptables, session context, CLR functions, etc.?

    Yeah, using temp tables is absolutely a workable solution, as is session context. CLR functions probably not, unless they utilize some external...

  • Reply To: Returning Info from Stored Procedures

    Lynn Pettis wrote:

    I doubt that using PRINT to return information is used on a regular basis.  The only time I use PRINT for the purpose is for debugging a procedure I...

  • Reply To: Returning Info from Stored Procedures

    Carlo Romagnano wrote:

    From any application (via ODBC or DB-LIBRARY) you can get the text returned from PRINT. In dblibrary you should use

    int msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity,char *msgtext,...

  • Reply To: Returning Info from Stored Procedures

    Carlo Romagnano wrote:

    Rune Bivrin wrote:

    Carlo Romagnano wrote:

    5

    Also with PRINT and RAISERROR

    By that reasoning you should also include THROW, as well as modifying data in tables (particularly temp tables created by the caller).

    Personally, I...

  • Reply To: Returning Info from Stored Procedures

    Carlo Romagnano wrote:

    5

    Also with PRINT and RAISERROR

    By that reasoning you should also include THROW, as well as modifying data in tables (particularly temp tables created by the caller).

    Personally, I would not...

  • Reply To: DBCC Meaning

    Unless my memory is completely shot, back in version 1.1a (yes, I'm that old / started that young) it really stood for "Database Consistency Check". That was pretty much all...

  • Reply To: Calculate the Days Between First and Last Orders

    Good one!

    Until I understood the framing context, I used to do the LAST_VALUE as FIRST_VALUE(.. ORDER BY [col] DESC), which works out the same, but is likely a worse approach...

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