Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Database Query -- Data Type Mismatch | Excel Discussion (Misc queries) | |||
HELP! Lose Database Query upon Refresh | Excel Worksheet Functions | |||
Excel Database Query String Too Long | Excel Discussion (Misc queries) | |||
Query a Access database that has a module from Excel | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |