![]() |
Query of an SQL Database
I have a query made to pull information in from a SQL database. From time to time, this query exceeds the the 65,000 row limitation. So the question is kind of two part. 1. How can I limit the query to only pull 65,536 rows of data? 2. How can I force the query to start dumping to a new worksheet once the first one has reached it's capacity? Thanks. -- brewabelPosted from http://www.pcreview.co.uk/ newsgroup access |
Use this clause in the sql of the query (go to the SQL window)
Select Field1, Field2 from table A; becomes Select top (x) field1, field2 from table A. As for the second part, I believe you'll have to make code to scroll through a recordset. Once you reach row 65536, start on another worksheet. *** I would say that with newer versions of excel you can make pivot tables DIRECTLY from external data (ie queries in access) or make an 'olap cube' (look at the help for that one). I'd explore one of those options. probably help you reach your true goal easier. "brewabel" wrote: I have a query made to pull information in from a SQL database. From time to time, this query exceeds the the 65,000 row limitation. So the question is kind of two part. 1. How can I limit the query to only pull 65,536 rows of data? 2. How can I force the query to start dumping to a new worksheet once the first one has reached it's capacity? Thanks. -- brewabelPosted from http://www.pcreview.co.uk/ newsgroup access |
All times are GMT +1. The time now is 02:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com