Append output from SQLCMD in batch file

  • carissa.chris (6/15/2009)


    I wanted a "forever" log and the ">> E:\output.txt" accomplishes exactly what I needed. Thanks for all the input.

    πŸ™‚

    Ok... you guys can remove the handrails, now. πŸ˜›

    --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 (6/15/2009)


    Ok... you guys can remove the handrails, now. πŸ˜›

    ..... getting out the reciprocating saw .... or will that cause too much damage where the handrails are installed at? :w00t:

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (6/15/2009)


    Jeff Moden (6/15/2009)


    Ok... you guys can remove the handrails, now. πŸ˜›

    ..... getting out the reciprocating saw .... or will that cause too much damage where the handrails are installed at? :w00t:

    Heh.... no.... a simple "unscrewing" will do. πŸ˜€

    --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 (6/15/2009)


    WayneS (6/15/2009)


    Jeff Moden (6/15/2009)


    Ok... you guys can remove the handrails, now. πŸ˜›

    ..... getting out the reciprocating saw .... or will that cause too much damage where the handrails are installed at? :w00t:

    Heh.... no.... a simple "unscrewing" will do. πŸ˜€

    You know Jeff, I have to admit that you have a way of bringing a smile to my face... Thanks!

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • [Borrowing the thread]

    The ">>" "operator" was exactly was I was looking for (wanted appending feature to sqlcmd), it does what I want.

    Unfortunately it seems not to support the same "codepage (1252)" as "-o" does.

    Being in Sweden I miss my "special" characters.

    Any workarounds/tricks on that β€œissue” Jeff?

Viewing 5 posts - 16 through 19 (of 19 total)

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