FIX: Count(*) May Not Return Result Set

Last reviewed: September 8, 1997
Article ID: Q152690

The information in this article applies to:
  • Microsoft SQL Server version 6.5
BUG# 15418 (6.5)

SYMPTOMS

Count(*) may not return a result set. This problem occurs on tables with 34 or more columns. When a query is executed, it may return the following message:

   This command did not return data, and it did not return any rows

This behavior has also been observed for SELECT-INTO from that table to another table.

When you select from a view which has a definition like select * from another view you may not return results. The base view definition would be on a table with 34 columns or more.

WORKAROUND

You can use the following query instead of the Count(*) on the table

   select rows from sysindexes where name like 'My_Table_name'

To perform SELECT-INTO from the source table to the destination table, create the destination table and perform the following query:

   insert Destination_Table select * from Source_Table

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 6.5. For more information, contact your primary support provider.


Additional query words:
Keywords : kbbug6.50 kbfix6.50.sp1 SSrvProg kbprg kbfixlist
Version : 6.5
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.