你能告诉我错误是什么吗?

时间:2018-02-02 08:38:18

标签: oracle-sqldeveloper

你好,请告诉我,这个程序中的错误是什么: -

set SERVEROUTPUT on;
create or replace procedure pro_industry
(P_SSN IN INDUSTRY.INDUSTRYID%TYPE) IS  V_UnionId 
industry.unionid%TYPE;
V_ABNNUMBER BUSINESS_INDUSTRY.ABNNUMBER%TYPE;
begin select BUSINESS_INDUSTRY.ABNNUMBER,industry.unionid  INTO 
V_ABNNUMBER,V_UnionId from BUSINESS_INDUSTRY B , INDUSTRY  WHERE
BUSINESS_INDUSTRY.INDUSTRYID=p_ssn

DBMS_OUTPUT.put_line (V_UnionId||'    '|| V_ABNNUMBER);                         
END PRO_INDUSTRY;

EXECUTE PRO_INDUSTRY sql developer显示以下错误: -

  

错误(9,2):PL / SQL:忽略SQL语句,错误(15,2):PL / SQL:   ORA-00933:SQL命令未正确结束

1 个答案:

答案 0 :(得分:0)

CREATE OR REPLACE PROCEDURE pro_industry(P_SSN IN INDUSTRY.INDUSTRYID%TYPE) IS
    V_UnionId                               industry.unionid%TYPE;
    V_ABNNUMBER                             BUSINESS_INDUSTRY.ABNNUMBER%TYPE;
BEGIN
    SELECT BUSINESS_INDUSTRY.ABNNUMBER, industry.unionid
      INTO V_ABNNUMBER, V_UnionId
      FROM BUSINESS_INDUSTRY B, INDUSTRY
     WHERE BUSINESS_INDUSTRY.INDUSTRYID = p_ssn; /* <-- the missing semicolon */

    DBMS_OUTPUT.put_line(V_UnionId || '    ' || V_ABNNUMBER);
END PRO_INDUSTRY;