neb wrote:
> What's wrong with this code:
>
> INSERT INTO [Excel 8.0;Database="C:\Documents and
> Settings\Administrator\Desktop\test.xls"].Report SELECT * FROM count_preb;
>
> any help will be much appreciated.
Try removing the quotes and appending a semicolon separator to the
filename e.g.
INSERT INTO [Excel 8.0;Database=C:\Documents and
Settings\Administrator\Desktop\test.xls;].Report SELECT * FROM
count_preb;
Even better would be to supply column names (SELECT * is not for
production code) e.g.
INSERT INTO [Excel 8.0;HDR=Yes;Database=C:\Documents and
Settings\Administrator\Desktop\test.xls;].Report (xlcol1, xlcol2,
xlcol3)
SELECT col1, col2, col3
FROM count_preb;
Jamie.
--
|