CTE not working

Hello Im trying to import this query to toad but I got an error
Error:
"[Microsoft][ODBC Excel Driver] Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'."

SQL QUERY:

WITH DepartmentSalaries AS (
SELECT
department_id,
AVG(salary) AS avg_salary
FROM
employees
GROUP BY
department_id
)
SELECT
e.employee_id,
e.employee_name,
ds.avg_salary
FROM
employees e
JOIN
DepartmentSalaries ds
ON
e.department_id = ds.department_id;

I guess you mean Toad Data Point, not Toad for Oracle. Toad for Oracle doesn't use the ODBC Excel Driver. I will move your post to that forum.

yes please , thanks!