2016-05-10 5 views
0

ヒキガエルを使用してOracle 10gのテーブル内のデータもデータがないが言ったテーブルに挿入します。挿入複数の行私はヒキガエルではなく、示されていないエラーメッセージを使用してOracleで複数のデータを挿入しようとしています10.5

INSERT ALL 
     INTO nratuser (username, password) VALUES ('alahalia','alahalia') 
     INTO nratuser (username, password) VALUES ('alamudi','alamudi'), 
     INTO nratuser (username, password) VALUES ('albilad','albilad'), 
     INTO nratuser (username, password) VALUES ('aldar','aldar'), 
     INTO nratuser (username, password) VALUES ('alfalah','alfalah'), 
     INTO nratuser (username, password) VALUES ('almona','almona'), 
     INTO nratuser (username, password) VALUES ('ansari','ansari'), 
     INTO nratuser (username, password) VALUES ('ansari_eft','ansari_eft'), 
     INTO nratuser (username, password) VALUES ('bahfinance','bahfinance'), 
     INTO nratuser (username, password) VALUES ('bec','bec'), 
     INTO nratuser (username, password) VALUES ('bfc','bfc'), 
     INTO nratuser (username, password) VALUES ('city_int','city_int'), 
     INTO nratuser (username, password) VALUES ('city_spot','city_spot'), 
     INTO nratuser (username, password) VALUES ('dlc','dlc'), 
     INTO nratuser (username, password) VALUES ('gulf','gulf'), 
     INTO nratuser (username, password) VALUES ('habib','habib'), 
     INTO nratuser (username, password) VALUES ('ime','ime'), 
     INTO nratuser (username, password) VALUES ('imespot','imespot'), 
     INTO nratuser (username, password) VALUES ('kbi','kbi'), 
     INTO nratuser (username, password) VALUES ('modern','modern'), 
     INTO nratuser (username, password) VALUES ('mullah','mullah'), 
     INTO nratuser (username, password) VALUES ('muscat','muscat'), 
     INTO nratuser (username, password) VALUES ('muzaini','muzaini'), 
     INTO nratuser (username, password) VALUES ('nonoo','nonoo'), 
     INTO nratuser (username, password) VALUES ('oman','oman'), 
     INTO nratuser (username, password) VALUES ('oman_int','oman_int'), 
     INTO nratuser (username, password) VALUES ('oman_uae','oman_uae'), 
     INTO nratuser (username, password) VALUES ('prabhu','prabhu'), 
     INTO nratuser (username, password) VALUES ('prime','prime'), 
     INTO nratuser (username, password) VALUES ('rastamani','rastamani'), 
     INTO nratuser (username, password) VALUES ('tfr','tfr'), 
     INTO nratuser (username, password) VALUES ('tfr_spot','tfr_spot'), 
     INTO nratuser (username, password) VALUES ('uae','uae'), 
     INTO nratuser (username, password) VALUES ('uae_dubai','uae_dubai'), 
     INTO nratuser (username, password) VALUES ('uaekuwait','uaekuwait'), 
     INTO nratuser (username, password) VALUES ('wall','wall'), 
     INTO nratuser (username, password) VALUES ('western','western'), 
     INTO nratuser (username, password) VALUES ('xpressmoney','xpressmoney'), 
     INTO nratuser (username, password) VALUES ('zenj','zenj'), 
     INTO nratuser (username, password) VALUES ('zenj_spot','zenj_spot'); 

SELECT * FROM DUAL; 

答えて

1

あなたはSELECT前に、セミコロンを削除する必要があり、コンマは各INTO句の後:

SQL> INSERT ALL 
    2   INTO nratuser (username, password) VALUES ('alahalia','alahalia') 
    3   INTO nratuser (username, password) VALUES ('alamudi','alamudi') 
    4   INTO nratuser (username, password) VALUES ('albilad','albilad') 
    5   INTO nratuser (username, password) VALUES ('aldar','aldar') 
    6   INTO nratuser (username, password) VALUES ('alfalah','alfalah') 
    7   INTO nratuser (username, password) VALUES ('almona','almona') 
    8   INTO nratuser (username, password) VALUES ('ansari','ansari') 
    9   INTO nratuser (username, password) VALUES ('ansari_eft','ansari_eft') 
10   INTO nratuser (username, password) VALUES ('bahfinance','bahfinance') 
11   INTO nratuser (username, password) VALUES ('bec','bec') 
12   INTO nratuser (username, password) VALUES ('bfc','bfc') 
13   INTO nratuser (username, password) VALUES ('city_int','city_int') 
14   INTO nratuser (username, password) VALUES ('city_spot','city_spot') 
15   INTO nratuser (username, password) VALUES ('dlc','dlc') 
16   INTO nratuser (username, password) VALUES ('gulf','gulf') 
17   INTO nratuser (username, password) VALUES ('habib','habib') 
18   INTO nratuser (username, password) VALUES ('ime','ime') 
19   INTO nratuser (username, password) VALUES ('imespot','imespot') 
20   INTO nratuser (username, password) VALUES ('kbi','kbi') 
21   INTO nratuser (username, password) VALUES ('modern','modern') 
22   INTO nratuser (username, password) VALUES ('mullah','mullah') 
23   INTO nratuser (username, password) VALUES ('muscat','muscat') 
24   INTO nratuser (username, password) VALUES ('muzaini','muzaini') 
25   INTO nratuser (username, password) VALUES ('nonoo','nonoo') 
26   INTO nratuser (username, password) VALUES ('oman','oman') 
27   INTO nratuser (username, password) VALUES ('oman_int','oman_int') 
28   INTO nratuser (username, password) VALUES ('oman_uae','oman_uae') 
29   INTO nratuser (username, password) VALUES ('prabhu','prabhu') 
30   INTO nratuser (username, password) VALUES ('prime','prime') 
31   INTO nratuser (username, password) VALUES ('rastamani','rastamani') 
32   INTO nratuser (username, password) VALUES ('tfr','tfr') 
33   INTO nratuser (username, password) VALUES ('tfr_spot','tfr_spot') 
34   INTO nratuser (username, password) VALUES ('uae','uae') 
35   INTO nratuser (username, password) VALUES ('uae_dubai','uae_dubai') 
36   INTO nratuser (username, password) VALUES ('uaekuwait','uaekuwait') 
37   INTO nratuser (username, password) VALUES ('wall','wall') 
38   INTO nratuser (username, password) VALUES ('western','western') 
39   INTO nratuser (username, password) VALUES ('xpressmoney','xpressmoney') 
40   INTO nratuser (username, password) VALUES ('zenj','zenj') 
41   INTO nratuser (username, password) VALUES ('zenj_spot','zenj_spot') 
42 SELECT * FROM DUAL; 

40 rows created. 

SQL> 
SQL> select count(1) 
    2 from nratuser; 

    COUNT(1) 
---------- 
     40 

SQL> 
+0

感謝を使用しますが、私は失敗しています。私はこのコードをタードエディタに貼り付けて実行します。データはテーブルに挿入されていません – Firefog

+0

コミットしましたか?私は試してみました(私の答えを編集した)、これはそこにある – Aleksej

+0

はそうそう私は – Firefog

1

あなたは、各行の末尾にcommaを必要といけません。最後にinsertの末尾にあるsemicolonも削除してください。その答えは、この

INSERT ALL 
    INTO nratuser (username, password) VALUES ('alahalia','alahalia') 
    INTO nratuser (username, password) VALUES ('alamudi','alamudi') 
    INTO nratuser (username, password) VALUES ('albilad','albilad') 
    INTO nratuser (username, password) VALUES ('aldar','aldar') 
    INTO nratuser (username, password) VALUES ('alfalah','alfalah') 
    INTO nratuser (username, password) VALUES ('almona','almona') 
    INTO nratuser (username, password) VALUES ('ansari','ansari') 
    INTO nratuser (username, password) VALUES ('ansari_eft','ansari_eft') 
    INTO nratuser (username, password) VALUES ('bahfinance','bahfinance') 
    INTO nratuser (username, password) VALUES ('bec','bec') 
    INTO nratuser (username, password) VALUES ('bfc','bfc') 
    INTO nratuser (username, password) VALUES ('city_int','city_int') 
    INTO nratuser (username, password) VALUES ('city_spot','city_spot') 
    INTO nratuser (username, password) VALUES ('dlc','dlc') 
    INTO nratuser (username, password) VALUES ('gulf','gulf') 
    INTO nratuser (username, password) VALUES ('habib','habib') 
    INTO nratuser (username, password) VALUES ('ime','ime') 
    INTO nratuser (username, password) VALUES ('imespot','imespot') 
    INTO nratuser (username, password) VALUES ('kbi','kbi') 
    INTO nratuser (username, password) VALUES ('modern','modern') 
    INTO nratuser (username, password) VALUES ('mullah','mullah') 
    INTO nratuser (username, password) VALUES ('muscat','muscat') 
    INTO nratuser (username, password) VALUES ('muzaini','muzaini') 
    INTO nratuser (username, password) VALUES ('nonoo','nonoo') 
    INTO nratuser (username, password) VALUES ('oman','oman') 
    INTO nratuser (username, password) VALUES ('oman_int','oman_int') 
    INTO nratuser (username, password) VALUES ('oman_uae','oman_uae') 
    INTO nratuser (username, password) VALUES ('prabhu','prabhu') 
    INTO nratuser (username, password) VALUES ('prime','prime') 
    INTO nratuser (username, password) VALUES ('rastamani','rastamani') 
    INTO nratuser (username, password) VALUES ('tfr','tfr') 
    INTO nratuser (username, password) VALUES ('tfr_spot','tfr_spot') 
    INTO nratuser (username, password) VALUES ('uae','uae') 
    INTO nratuser (username, password) VALUES ('uae_dubai','uae_dubai') 
    INTO nratuser (username, password) VALUES ('uaekuwait','uaekuwait') 
    INTO nratuser (username, password) VALUES ('wall','wall') 
    INTO nratuser (username, password) VALUES ('western','western') 
    INTO nratuser (username, password) VALUES ('xpressmoney','xpressmoney') 
    INTO nratuser (username, password) VALUES ('zenj','zenj') 
    INTO nratuser (username, password) VALUES ('zenj_spot','zenj_spot') 

SELECT * FROM DUAL; 
関連する問題