Retrieving Many Records in Query Analyzer
Richard Waymire helps a reader fetch 5 million records.
Richard Waymire
November 19, 2001
1 Min Read
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.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like