views:

14

answers:

1

I need to selectively (both rows and columns) export around 20 million rows from one table to another. This is what I tried:

--Run this in batch:
INSERT INTO Table 2
Select A, B from Table1 
where A > a and B < b

---Table1 have columns A, B....Z and got around 50 million records. 

It takes around 12 hours to finish. I don't think sybase allows bcp out with selective columns and rows from Table1 and bcp in to Table2. Is there an alternative fast approach that can be used? I would be happy if it can be done < 4 hours.

Thanks for reading it.