I have two select queries which have same column structure. The first query returns summary of the data and the second returns the actual data.
I want to export the results from both queries in the same Excel worksheet. The problem is, when I use the SQL code snippet which exports query result in xls file, the second query complains with this error:
Here are the queries:Code:Table 'MyWorkSheet' already exists., error number: 3010
Is there a way to export results of both queries into the same Excel worksheet?Code:SELECT Count(MyTable.Col1) AS CountOfCol1, MyTable.Col2 INTO [MyWorkSheet] IN ''[Excel 8.0;Database=C:\Documents and Settings\MyCol2Name\My Documents\MyExcelFile.xls] FROM MyTable GROUP BY MyTable.Col2; SELECT MyTable.Col1, MyTable.Col2 INTO [MyWorkSheet] IN ''[Excel 8.0;Database=C:\Documents and Settings\MyCol2Name\My Documents\MyExcelFile.xls] FROM MyTable;




Reply With Quote
