Ir para conteúdo
Fórum Script Brasil

Adauto Da Silva Lima

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Adauto Da Silva Lima

Adauto Da Silva Lima's Achievements

0

Reputação

  1. Bom dia a todos! Alguém tem um script de criação de função em Mysql. Preciso criar uma mas não acerto o código, tem vários erros que não consigo arrumar. Por favor alguém pode ajudar? Minha função: CREATE FUNCTION eim.getFluxoSite (idSiteLocal int) RETURNS VARCHAR(60) BEGIN DECLARE v_s_retorno, v_s_retorno_aux VARCHAR(60); ret: LOOP begin declare continue handler for not found set v_s_retorno_aux = null; select tf.acronym from eim.tipo_fluxo tf WHERE exists (select 1 from eim.site_rf sr, eim.project_site ps, eim.step_status ss, eim.fase f, eim.step s where s.tipo_fluxo_id = tf.id and ss.step_id = s.id and ss.fase_id = f.id and ps.site_rf_id = sr.id and sr.site_local_id = id_site_local and concat(s.description,' ',f.description) = ps.status); end; if v_s_retorno is null then set v_s_retorno = v_s_retorno_aux; else set v_s_retorno = concat(v_s_retorno,' - ',v_s_retorno_aux); end if; if (v_s_retorno_aux is null) then leave ret; end if; end loop ret; */ return v_s_retorno; end;
×
×
  • Criar Novo...