简体   繁体   English

Sql开发人员脚本输出

[英]Sql developer script output

I'm working with SQL Developer on a school project. 我在一个学校项目上与SQL Developer合作。 SQL Developer returns the query result but no script output. SQL Developer返回查询结果但没有脚本输出。 I also have a warning saying the table curso is disconnected from the join graph, can anyone help? 我也有一个警告说表格curso与连接图断开连接,任何人都可以帮忙吗?

select departamento as "Sigla do Departamento",nome_depart as "Nome do Departamento", anolectivo as "Ano Lectivo", round((sum(num_presencas)*100)/sum(alunos_por_turno),1)||'%' as "Percentagem de presenças"
from ei_sad_proj_gisem.v_aulas_semana aulas_semana
join ei_sad_proj_gisem.v_turnos turnos
on aulas_semana.turno_id = turnos.id
join t_ext_curso_ei curso
on upper(trim(turnos.nomeuc)) = upper(trim(curso.unidade_curricular))
join (select turno_id,count(*) as alunos_por_turno 
      from ei_sad_proj_gisem.v_turno_user
      group by turno_id) total_inscritos
on turnos.id = total_inscritos.turno_id
join t_ext_departamentos departamentos
on departamentos.sigla_depart = departamento
where aulas_semana.marcou_presenca =1
and aulas_semana.aula_cancelada =0
group by departamento, anolectivo, nome_depart;

查询结果在这里

As of script output: include "SET SERVEROUTPUT ON" at the beginning of your script. 从脚本输出开始:在脚本开头包含“SET SERVEROUTPUT ON”。 For example: 例如:

set serveroutput on

declare
  l_dum varchar2(1);
begin
  select dummy into l_dum from dual;
  dbms_output.put_line(l_dum);
end;
/

Doing so, "Script Output" window should display data. 这样,“脚本输出”窗口应显示数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM