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
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: