FIX: Count(*) May Not Return Result Set

ID: Q152690


The information in this article applies to:

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.


Keywords          : kbprg SSrvProg kbbug6.50 kbfix6.50.sp1 
Version           : 6.5
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: March 29, 1999