Ir para conteúdo
Fórum Script Brasil

cricwind17

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Sobre cricwind17

cricwind17's Achievements

0

Reputação

  1. Pessoal, está resolvido! Está faltando um parênteses aí. Desculpem o erro grosseiro! IF (((select trio from tab_original where num = ct1) = (select trio from tab_original where num = (ct1+1))) and flag=0) THEN
  2. Pessoal, seguinte, eu tinha um código que tinha apenas um IF, e eu desmembrei o IF em dois. Porém o primeiro IF agora é acusado de erro de sintaxe =S Não sei mais o que fazer, já revisei o código inteiro, pesquisei sobre a sintaxe de IF e parece estar tudo certo. O script antigo funciona. A sintaxe do IF antigo é esta: IF ((select trio from tab_original where num = ct1) = (select trio from tab_original where num = (ct1+1)) OR (select sinal from tab_original where num = ct1) = 1) and flag=0 THEN insert into p00_trios_replicados (trio,ano,mes,conta) values((select trio from tab_original where num=(ct1+1)), (select ano from tab_original where num=(ct1+1)),(select mes from tab_original where num=(ct1+1)), (select conta from comeind_original where num=(ct1+1))); set flag = 1; END IF; A sintaxe do IF modificado: (erro de sintaxe aparece no THEN em vermelho) IF (((select trio from tab_original where num = ct1) = (select trio from tab_original where num = (ct1+1)) and flag=0) THEN insert into p00_trios_replicados (trio,ano,mes,cont) values((select trio from tab_original where num=(ct1+1)), (select ano from tab_original where num=(ct1+1)),(select mes from tab_original where num=(ct1+1)), (select cont from tab_original where num=(ct1+1))); set flag = 1; END IF; IF ((select sinal from tab_original where num = ct1) = 1) and flag=0) THEN insert into p00_trios_replicados (trio,ano,mes,cont) values((select trio from tab_original where num=(ct1)), (select ano from tab_original where num=(ct1)),(select mes from tab_original where num=(ct1)), (select cont from tab_original where num=(ct1))); set flag = 1; END IF;
×
×
  • Criar Novo...