This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / Sql Server7 QuestionsQuestion 1:There is a table with over 180000 rows and it need to be export to Excle file.
How do to do it?
Question 2:
Why the new table's (order )may be different from the original table if using the following stmt.
select * into tbl2 from tbl1
Thanks
-xxu999(杰姆);
2005-8-14
{265}
(#2450450@0)
-
没太多经验, 胡乱答.Q1. 我觉得可以直接export到excel好了.
Q2. tbl1 and tbl2 doesn't have identical index. content is same, but sort order is difference.
-weiweiwoo(summer);
2005-8-14
{133}
(#2450529@0)
-
1. Using DTS to export into Excel format.
2. Check the index of original table and add ORDER BY statement in your SQL statement to see if it works.
-ttaaoo(tao);
2005-8-14
(#2451211@0)
-
1.One Excel sheet cannot hold such big amount rows, so it has to be seperate at least 3 sheets.
2. it does not really ordered after using 'select * into tbl2 from tbl1 Order by col1,col2'
-xxu999(杰姆);
2005-8-14
(#2451945@0)
-
my answers1. You can use either DTS or bcp to transfer that table into excel file, but using bcp is faster
2. When you use select * into B from A, the index structure of A is not retained in B and the table B is just a kind of heap which doesn't have any index. This is the reason why the order may be different between two tables.
-yangn(Raymond);
2005-8-14
{326}
(#2451222@0)
-
2. Your analysis is correct. How do you solve this problem?
Thanks
-xxu999(杰姆);
2005-8-15
(#2452357@0)
-
Create same indexes on Table B as they are on table A
-hard20(hard20);
2005-8-15
(#2452451@0)