• subscribe
November 20, 2001 12:00 AM

Retrieving Many Records in Query Analyzer

SQL Server Pro
InstantDoc ID #22959

When I execute the following statement in Query Analyzer

SELECT * FROM axitem

I get a virtual-memory error message, then Query Analyzer cancels the query. The axitem table has more than 5 million records. How can I execute the query, fetch some records, wait for a few seconds, fetch the next set of records, and so on?

The easiest way to retrieve a large number of records is to use the TOP statement to filter out one set of records at a time. For details, see Itzik Ben-Gan, T-SQL Black Belt, "Over the TOP," February 2001.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here