Splitting large amounts of data in a table
-
Is there a way to split data into two separate tables with a single SQL statement? I know that sounds like an odd question, but I have a large table in terms of rows, and I would like to "split" the data into two separate tables for separate processing in parallel fashion. Call me crazy but I thought there was a way to do that in SQL Server, i.e. a SQL statement to divide the table into two separate tables. Is there a way to do that or am I misremembering?
-
Is there a way to split data into two separate tables with a single SQL statement? I know that sounds like an odd question, but I have a large table in terms of rows, and I would like to "split" the data into two separate tables for separate processing in parallel fashion. Call me crazy but I thought there was a way to do that in SQL Server, i.e. a SQL statement to divide the table into two separate tables. Is there a way to do that or am I misremembering?
Take a look at partitioning although I would be wary of physically splitting a table simply for parallel processing, there are probably better ways of doing the job.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
-
Is there a way to split data into two separate tables with a single SQL statement? I know that sounds like an odd question, but I have a large table in terms of rows, and I would like to "split" the data into two separate tables for separate processing in parallel fashion. Call me crazy but I thought there was a way to do that in SQL Server, i.e. a SQL statement to divide the table into two separate tables. Is there a way to do that or am I misremembering?
Just run two selects ("in one statement"). Select "top half" (count / 2) in one case, select the rest for the other (not in; greater than; whichever).
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
Is there a way to split data into two separate tables with a single SQL statement? I know that sounds like an odd question, but I have a large table in terms of rows, and I would like to "split" the data into two separate tables for separate processing in parallel fashion. Call me crazy but I thought there was a way to do that in SQL Server, i.e. a SQL statement to divide the table into two separate tables. Is there a way to do that or am I misremembering?
Why not implement it in a procedure?