最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

請(qǐng)看一下哪里出問題了

set serveroutput on;

declare

? ? cursor cemp is select to_char(hiredate, 'yyyy') from emp;

? ? phiredate varchar2(4);

? ? count80 number := 0;

? ? count81 number := 0;

? ? count82 number := 0;

? ? count87 number := 0;

begin

? ? open cemp;

? ? loop

? ? ? ? fetch cemp into phiredate;

? ? ? ? exit when cemp%notfound;

? ? ? ? if phiredate='1980' then count80:=count80+1;

? ? ? ? elsif phiredate='1981' then count81:=count81+1;

? ? ? ? elsif phiredate='1982' then count82:=count82+1;

? ? ? ? else count87 := count87 + 1;

? ? ? ? end if;?

? ? end loop;

? ? close cemp;

? ? dbms_output.put_line('Total '||count80 + count81 + count82 + count87);

? ? dbms_output.put_line('1980 '||count80);

? ? dbms_output.put_line('1981 '||count81);

? ? dbms_output.put_line('1982 '||count82);

? ? dbms_output.put_line('1987 '||count87);

end;

/



錯(cuò)誤報(bào)告 -

ORA-06502: PL/SQL: 數(shù)字或值錯(cuò)誤 :? 字符到數(shù)值的轉(zhuǎn)換錯(cuò)誤

ORA-06512: 在 line 20

06502. 00000 -? "PL/SQL: numeric or value error%s"

*Cause:? ? An arithmetic, numeric, string, conversion, or constraint error

? ? ? ? ? ?occurred. For example, this error occurs if an attempt is made to

? ? ? ? ? ?assign the value NULL to a variable declared NOT NULL, or if an

? ? ? ? ? ?attempt is made to assign an integer larger than 99 to a variable

? ? ? ? ? ?declared NUMBER(2).

*Action:? ?Change the data, how it is manipulated, or how it is declared so

? ? ? ? ? ?that values do not violate constraints.


正在回答

1 回答

找到原因了:

dbms_output.put_line('Total '||count80 + count81 + count82 + count87);這一句后面要用括號(hào)包起來,應(yīng)該是:

dbms_output.put_line('Total '||(count80 + count81 + count82 + count87));

2 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

請(qǐng)看一下哪里出問題了

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)