Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Chleb
Starting Member
1 Post |
Posted - 2005-12-28 : 08:31:37
|
| hello,I've got a big table and I want to cut it in 3 tables. What is the command to do it with Transact SQL?Thanks for your help.Chleb |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-28 : 08:35:03
|
| It depends on how you want it to cut. One of the solutions is create Views and filter dataCreate View view1asSelect columns from yourTable where <condition1>Similarly create two more views with valid conditionsWhy do you want to do this?MadhivananFailing to plan is Planning to fail |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2005-12-28 : 09:08:19
|
| Select * into BkupTbl from OriginalTblSelect top 10000 * into Tbl_1 from OriginalTbl order by PrimKeyDelete from OriginalTbl where PrimKey in (select PrimKey from Tbl_1)Select top 10000 * into Tbl_2 from OriginalTbl order by PrimKeyDelete from OriginalTbl where PrimKey in (select PrimKey from Tbl_2)and so on |
 |
|
|
|
|
|