I'm trying to generate a spool but it marks me wrong syntax
when I insert in the variable
COL Nombre_emp new_value Nombre_emp;
SELECT TO_CHAR(TO_DATE(TRUNC(MAX(ID_MES)),'YYYYMM'),'YYYYMM')||'.txt' Nombre_emp FROM estudiante WHERE ID_MES > 201801;
COL Mes new_value Mes;
SELECT MAX(ID_MES) Mes FROM estudiante WHERE ID_MES > 201801;
and insert it into the select with which the spool will be generated
adding the variable in this way
(select * FROM estudiante WHERE ID_MES = &Mes)
marks me syntax error could you help me