Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 이클립스
- sqldeveloper
- 자료형
- Operator
- 자바
- HTML
- Servlet
- 삐옥
- 코딩
- error
- 변수
- 오라클오류
- datatype
- select
- variable
- SQL
- JS
- 오라클
- 오류
- CSS
- Eclipse
- 서블릿
- oracle
- 에러
- 개발자
- VisualStudioCode
- 연산자
- From
- Java
- function
Archives
- Today
- Total
뇨내
PLS-00306 본문
오류보고
PL/SQL: Statement ignored
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
= 문법 무시 + 'PUT_LINE'부분에 잘못된 숫자 및 인수가들어감
해 결
> 84 line 부분이 에러!! ',' 가 들어가면 안된다.
- 수정전
dbms_output.put_line(tname, cname, vstartclassdate, vfinishclassdate, crname, vtotal, cstate);
- 수정후
dbms_output.put_line(tname || cname || vstartclassdate || vfinishclassdate || crname || vtotal || cstate);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
create or replace procedure proTClassSearch
(
pteacher_seq tblteacher.teacher_seq%type
)
is
tname tblteacher.name%type;
cname tblclass.name%type;
vstartclassdate tbllclass.startclassdate%type;
vfinishclassdate tbllclass.finishclassdate%type;
crname tblclassroom.name%type;
vtotal tblsugang.lclass_seq%type;--- 총 등록 인원수
cstate tbllclass.startclassdate%type; -- 강의 진행 상태
cursor vcursor is
select
distinct t.name as "교사명",
c.name as "과정명",
lc.startclassdate as "개강",
lc.finishclassdate as "종강",
cr.name "강의실",
(select count(distinct(student_seq))
from tblteacher t inner join tbllsubject ls on t.teacher_seq = ls.teacher_seq
inner join tbllclass lc on lc.lclass_seq = ls.lclass_seq
inner join tblsugang su on su.lclass_seq = lc.lclass_seq
where t.teacher_seq =pteacher_seq) as "등록인원수",
case
when lc.startclassdate <= sysdate and lc.finishclassdate >= sysdate then '진행중'
when lc.startclassdate > sysdate then '예정'
when lc.startclassdate < sysdate then '종료'
end as "강의진행상태"
from tblclass c
inner join tbllclass lc
on c.class_seq = lc.class_seq
inner join tbllsubject ls
on ls.lclass_seq = lc.class_seq
inner join tblteacher t
on t.teacher_seq = ls.teacher_seq
inner join tblclassroom cr
on cr.classroom_seq = lc.classroom_seq
where ls.teacher_seq = pteacher_seq
order by "개강" asc;
begin
open vcursor;
select (select count(distinct(student_seq))
from tblteacher t inner join tbllsubject ls on t.teacher_seq = ls.teacher_seq
inner join tbllclass lc on lc.lclass_seq = ls.lclass_seq
inner join tblsugang su on su.lclass_seq = lc.lclass_seq
where t.teacher_seq =pteacher_seq) into vtotal from tblclass c
inner join tbllclass lc
on c.class_seq = lc.class_seq
inner join tbllsubject ls
on ls.lclass_seq = lc.class_seq
inner join tblteacher t
on t.teacher_seq = ls.teacher_seq
inner join tblclassroom cr
on cr.classroom_seq = lc.classroom_seq
where ls.teacher_seq = pteacher_seq;
select
(case
when lc.startclassdate <= sysdate and lc.finishclassdate >= sysdate then '진행중'
when lc.startclassdate > sysdate then '예정'
when lc.startclassdate < sysdate then '종료'
end ) into cstate from tblclass c
inner join tbllclass lc
on c.class_seq = lc.class_seq
inner join tbllsubject ls
on ls.lclass_seq = lc.class_seq
inner join tblteacher t
on t.teacher_seq = ls.teacher_seq
inner join tblclassroom cr
on cr.classroom_seq = lc.classroom_seq
where ls.teacher_seq = pteacher_seq;
loop
fetch vcursor into tname, cname, vstartclassdate, vfinishclassdate, crname, vtotal, cstate;
exit when vcursor%notfound;
-- !!!!에러부분!!!!! dbms_output.put_line(tname, cname, vstartclassdate, vfinishclassdate, crname, vtotal, cstate);
end loop;
close vcursor;
end proTClassSearch;
|
cs |
Comments