In Procedure, I have created Temporary Table and am trying to use that temporary table in WITH clause (CTE).
But am getting the below error.
Error Code: 2242 Unhandled exception Type: ER_USER_RAISE (2242) Message:
PROC_INTEG line 449:
** ER_TEMPORARY_TABLE_INSIDE_CTE (1894), Temporary table MYDB.MIG_TEMP_TABLE_280220221047209289 cannot appear in the definition of common table expression. **
** Callstack: #0 Line 495 in
Kindly help me to resolve the issue or give me the alternate solution.
WITH BAS_QUERY AS
SELECT * FROM MIG_TEMP_TABLE_280220221047209289
SELECT * FROM FIN_TRANSACTION A , BAS_QUERY B