Export query to multiple excel worksheets and workbooks

Joined
Nov 17, 2009
Messages
1
Reaction score
0
Hi, Can anyone help me. I can get this statement to work for one arguement but when I add in the "OR" section if comes up with Syntax Error (Missing Operator)!

SELECT qry_summary_final_result.[Consultant], qry_summary_final_result.[ID], qry_summary_final_result.[Status], qry_summary_final_result.[Office Name], qry_summary_final_result.Practice, qry_summary_final_result.[Business unit].
INTO
[Excel 8.0;Database=\\Wwp\data\Data\2009\Benefits.xls].[GBP]
FROM
qry_summary_final_result
WHERE
Practice = "Benefits"
AND
Currency = "GBP"
OR
INTO [Excel 8.0;Database=\\Wwp\data\Data\2009\Consulting.xls].[GBP]
FROM
qry_summary_final_result
WHERE
Practice = "Consulting"
AND
Currency = "GBP"

Thanks
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top