PLS-00642:SQL语句中不允许使用本地集合类型。我正在使用oracle datadase 12c

时间:2019-05-14 04:43:08

标签: sql oracle

CREATE OR REPLACE PROCEDURE RDBSTAGE.ATCHMNT_ERR_FILEID AUTHID CURRENT_USER
IS
  CURSOR cv_atchtab IS
    SELECT * FROM ATTACHMENT_ERROR;

  type ATCHMNT_ERR_nt is table of cv_atchtab%ROWTYPE;
  I_ATCHMNT_ERR ATCHMNT_ERR_nt;

  type file_id_nt is table of VARCHAR2(40);
  V_FILE_ID file_id_nt;
BEGIN
  OPEN cv_atchtab;
  LOOP
    FETCH cv_atchtab BULK COLLECT INTO I_ATCHMNT_ERR;
    EXIT WHEN I_ATCHMNT_ERR.COUNT = 0; -- changed this

    FOR i IN 1..I_ATCHMNT_ERR.COUNT
    LOOP
      SELECT FILE_ID BULK COLLECT
      INTO V_FILE_ID
      FROM ATTACHMENT_CLAIM t1
      WHERE t1.CLAIM_TCN_ID = I_ATCHMNT_ERR(i).CLAIM_TCN_ID;

      UPDATE ATTACHMENT_ERROR t2
      SET FILE_ID = V_FILE_ID
      WHERE t2.CLAIM_TCN_ID = I_ATCHMNT_ERR(i).CLAIM_TCN_ID;  -- changed this
    END LOOP;

  END LOOP;    
  CLOSE cv_atchtab; 

END ATCHMNT_ERR_FILEID; 
/
Show ERRORS

1 个答案:

答案 0 :(得分:3)

也许我遗漏了一些东西,但是-阅读您的评论,它看起来像一个简单的 async checkNickName() { let formdata = new FormData(); formdata.append( "wallet_address", "gBx0f8751828af26816ef996c37e611b945304a6e99" ); formdata.append("new_nickname", this.state.nickname); fetch("http://192.168.0.26:11000/v1/point/auth/change_nickname", { method: "POST", body: formdata, headers: { "Content-Type": "multipart/form-data", api_key: "5b95576338b1eb1c53a1ae3f904dc7c5", game_key: "bf61b73dd871c2973188706d813002c2" } }) .then(res => res.json()) .then(response => { console.log(response); console.log(response.resultCode); if (response.resultCode == "S002") { AsyncStorage.setItem("gbrickobj", this.state.gbrickobj); AsyncStorage.setItem("nickname", this.state.nickname); this.props.navigation.navigate("RegisterSecurity"); } else if (response.resultCode == "S001") { this.setState({ checknick: "this nickname already use nickname." }); } else { Alert.alert("info", "check address."); } }) .catch(error => console.error("Error:", error)); } 声明。为什么您会以这种复杂的方式进行操作?

UPDATE