Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4

    Post Unanswered: Disable output on screen/in log during stored procedure

    A stored procedure I made produces a lot of output on the screen. Mostly resultsets and <# rows selected>-statements.
    I thought that <set nocount on> disabled those statements, but apparantly it doesn't.

    Is there an other way to disable this output? I only want to see <# rows selected>-statements if I want to, it's way to much to have them all in my output-file.

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    <set nocount on> should run !

  3. #3
    Join Date
    Feb 2004
    Posts
    28

    Re: Disable output on screen/in log during stored procedure

    "set nocount on" will only disable the "No of rows affected" message, not the resultset from the Stored proc.
    In Sybase, there is no command to disable the output (i.e resultset) from a Stored proc or Select statement.
    If you are running your job on a UNIX/Linux box, then you can use shell scripting to block/filter the resultset output from the SP.

    Originally posted by Martijnvs
    A stored procedure I made produces a lot of output on the screen. Mostly resultsets and <# rows selected>-statements.
    I thought that <set nocount on> disabled those statements, but apparantly it doesn't.

    Is there an other way to disable this output? I only want to see <# rows selected>-statements if I want to, it's way to much to have them all in my output-file.

  4. #4
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    After many trial-and-error-thingies, I noticed my little mistake.
    I used <select column from table> instead of <select @variable = column from table>
    This way the resultsets are not shown.

    I also went through all set nocounts-statements to check if they were on the right place.
    After all these things it worked the way I wanted it to .

    Thanks for the help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •