Professional Web Applications Themes

Why do PRINT results not appear in QA? - Microsoft SQL / MS SQL Server

Apart from the null problem you will not see any output until the buffer is full. You can force this by printin a large string to fill the buffer after your print. print space(8000). >-----Original Message----- >i have a long running operation (and one that would fill up the tempdb), so >i want to break it into smaller chunks, and PRINT my progress. > >i run the query in Query ysier, and all i ever see is > "(101 row(s) affected)" > >i never see my print output > >And it's happened in the past with other long-running loop based ...

  1. #1

    Default Why do PRINT results not appear in QA?

    Apart from the null problem you will not see any output
    until the buffer is full. You can force this by printin a
    large string to fill the buffer after your print.

    print space(8000).

    >-----Original Message-----
    >i have a long running operation (and one that would fill
    up the tempdb), so
    >i want to break it into smaller chunks, and PRINT my
    progress.
    >
    >i run the query in Query ysier, and all i ever see is
    > "(101 row(s) affected)"
    >
    >i never see my print output
    >
    >And it's happened in the past with other long-running
    loop based operations.
    >
    >What gives?
    >
    >declare SavedRC int
    >declare TotalRows int
    >
    >While (1=1)
    >begin
    > update TransactionEntries
    > SET SessionGUID = t.SessionGUID
    > FROM TransactionEntries te
    > INNER JOIN Transactions t
    > ON te.TransactionGUID = t.TransactionGUID
    > AND te.TransactionGUID IN (
    > SELECT TOP 100 TransactionGUID
    > FROM TransactionEntries
    > WHERE TransactionEntries.SessionGUID IS NULL)
    >
    > SET SavedRC = RowCount
    > SET TotalRows = TotalRows + SavedRC
    > print 'Rows processed: '+cast(TotalRows as varchar
    (50))
    > if SavedRC <= 0
    > Break
    >end
    >
    >
    >.
    >
    Nigel Rivett Guest

  2. #2

    Default Why do PRINT results not appear in QA?

    And you will have to set the result format to text not
    grid.

    >-----Original Message-----
    >i have a long running operation (and one that would fill
    up the tempdb), so
    >i want to break it into smaller chunks, and PRINT my
    progress.
    >
    >i run the query in Query ysier, and all i ever see is
    > "(101 row(s) affected)"
    >
    >i never see my print output
    >
    >And it's happened in the past with other long-running
    loop based operations.
    >
    >What gives?
    >
    >declare SavedRC int
    >declare TotalRows int
    >
    >While (1=1)
    >begin
    > update TransactionEntries
    > SET SessionGUID = t.SessionGUID
    > FROM TransactionEntries te
    > INNER JOIN Transactions t
    > ON te.TransactionGUID = t.TransactionGUID
    > AND te.TransactionGUID IN (
    > SELECT TOP 100 TransactionGUID
    > FROM TransactionEntries
    > WHERE TransactionEntries.SessionGUID IS NULL)
    >
    > SET SavedRC = RowCount
    > SET TotalRows = TotalRows + SavedRC
    > print 'Rows processed: '+cast(TotalRows as varchar
    (50))
    > if SavedRC <= 0
    > Break
    >end
    >
    >
    >.
    >
    Nigel Rivett Guest

Similar Threads

  1. Query results don't display properly in results table.IGNORE PREVIOUS
    By JoyRose in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 24th, 07:28 PM
  2. Pulling PRINT results from a stored procedure
    By Scott McNair in forum ASP Database
    Replies: 2
    Last Post: July 20th, 03:21 PM
  3. Replies: 4
    Last Post: April 25th, 08:26 PM
  4. for best print results
    By benluke@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: April 23rd, 01:36 PM
  5. Using PHP to Print SELECT Results - Incomplete Data Returned
    By Keith W. McCammon in forum PHP Development
    Replies: 5
    Last Post: November 13th, 07:39 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139