SQL - SQLCODE's - Códigos negativos -342


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SQLCode -342

   
 
  • Causa
    • THE COMMON TABLE EXPRESSION name MUST NOT USE SELECT DISTINCT AND MUST USE UNION ALL BECAUSE IT IS RECURSIVE.

      There are two possible explanations:
      • A fullselect within the common table expression name cannot start with SELECT DISTINCT because the common table expression is recursive.
      • A fullselect within the common table expression name specified UNION instead of UNION ALL as required for recursive common table expressions.
  • Ação do sistema
    • The statement cannot be processed.
  • Resposta ao Desenvolvedor
    • Remove the keyword DISTINCT from the common table expression, add the keyword ALL following UNION, or remove the recursive reference within the common table expression.

      SQLSTATE: 42925

© Copyright IBM Corp.