call spQuery_Combo_Producto_Sub_Familia('0000');

DROP PROCEDURE IF EXISTS spQuery_Combo_Producto_Sub_Familia;
CREATE PROCEDURE spQuery_Combo_Producto_Sub_Familia(
  varFamilia varchar(4)
  )
BEGIN 
  select id_sub_familia AS CSUB, 
  concat(substring(id_sub_familia,5,2), ' - ', nombre) as SUB_FAMILIA from _sv_sub_familia
  where _estado = 'A'
  and id_familia   = varFamilia
  order by nombre;
END;