Is it possible to search a column within a table for a numerical value range of 1-2000 and then copy each full row into a different table? By doing so technically splitting the table into smaller parts.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as unclear what you're asking by Paul White♦, Phil, RolandoMySQLDBA, Kin, Derek Downey Jun 4 '14 at 18:49
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.
Addressing the question behind the question:
If you already have a column by which you can "partition" the table, then you can do something like this:
Just note that this will give you a predictable number of rows, but won't control the size of the rows, so depending on the data in each "partition" these tables will not likely be of equal sizes.
You can add a column with a unique row number by using the row_number() function:
However, I strongly agree with Aaron Bertrand that you are creating inefficiencies, possibly on a massive scale. SQL is much better at searching/filtering data than Excel. You should, at the very least, consider using any parts of the search to filter the data in SQL BEFORE you pull it down to Excel, that will reduce the amount of data.