• Eugene Elutin (7/29/2013)

    RAISERROR has in-built token parsing functionality!

    Thanks all for your responses:

    Stop thinking about what you want to do to a print... think, instead, of what you want to do to all the prints.

    Problem was over 300 prints. Most for testing purposes.

    Response of the prints was not the issue. The issue was to replace the 300 print statements with something which can be switched on and off.

    There were all kinds of prints, with parameters (dates, timing, counting, tablenames), multi line etc.

    Replacing the 300 prints with different RAISERROR constructions was not a fast and short solution. Maybe the next time.

    Solution choosen is global substitute of 'print' with '-- print'.

    And replace the functional prints with a stored procedure. (about 15 locations). Not what I was looking for but it works.

    Thanks again,

    Ben