第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

哪里是我的無(wú)效角色(ORA-00911)

哪里是我的無(wú)效角色(ORA-00911)

holdtom 2019-08-13 16:08:35
哪里是我的無(wú)效角色(ORA-00911)我正在嘗試將CLOBs插入數(shù)據(jù)庫(kù)(請(qǐng)參閱相關(guān)問(wèn)題)。我無(wú)法弄清楚出了什么問(wèn)題。我有一個(gè)大約85個(gè)clobs的列表,我想插入表中。即使只插入我得到的第一個(gè)clob ORA-00911: invalid character。我無(wú)法弄清楚如何PreparedStatement在執(zhí)行之前獲取聲明,因此我無(wú)法100%確定它是正確的,但如果我做對(duì)了,那么它看起來(lái)應(yīng)該是這樣的:insert all  into domo_queries values ('select  substr(to_char(max_data),1,4) as year, substr(to_char(max_data),5,6) as month, max_data from dss_fin_user.acq_dashboard_src_load_success where source = ''CHQ PeopleSoft FS''')select * from dual;最終,這個(gè)insert all陳述會(huì)有很多into,這就是我不做常規(guī)insert陳述的原因。我沒(méi)有在那里看到無(wú)效的角色,對(duì)嗎?(哦,當(dāng)我在我的sql開(kāi)發(fā)人員工具中運(yùn)行它時(shí),上面的代碼運(yùn)行正常。)如果我刪除了分號(hào)PreparedStatement,它會(huì)拋出ORA-00933: SQL command not properly ended錯(cuò)誤。在任何情況下,這是我執(zhí)行查詢(xún)的代碼(以及上面示例的變量值)。public ResultSet executeQuery(String connection, String query, QueryParameter... params) throws DataException, SQLException {   // query at this point = "insert all                           //into domo_queries values (?)                           //select * from dual;"   Connection conn = ConnectionPool.getInstance().get(connection);   PreparedStatement pstmt = conn.prepareStatement(query);   for (int i = 1; i <= params.length; i++) {     QueryParameter param = params[i - 1];     switch (param.getType()) { //The type in the example is QueryParameter.CLOB       case QueryParameter.CLOB:         Clob clob = CLOB.createTemporary(conn, false, oracle.sql.CLOB.DURATION_SESSION);         clob.setString(i, "'" + param.getValue() + "'");         //the value of param.getValue() at this point is:         /*          * select           * substr(to_char(max_data),1,4) as year,          * substr(to_char(max_data),5,6) as month,          * max_data          * from dss_fin_user.acq_dashboard_src_load_success          * where source = ''CHQ PeopleSoft FS''          */         pstmt.setClob(i, clob);         break;       case QueryParameter.STRING:         pstmt.setString(i, "'" + param.getValue() + "'");         break;     }   }有什么我只是錯(cuò)過(guò)了很多時(shí)間嗎?
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 698 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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