2012-11-10 27 views
7

我想使用腳本將大約15,000行數據輸入到我的表中,但是當我運行該腳本時,出現一個彈出窗口,要求我輸入替換變量。SQL Developer幫助輸入一個替換變量

我該如何阻止彈出來讓它輸入日期?

這裏有一些數據線,我需要輸入

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Normal', 4771, 'Carfax & Co', 'Matriotism Plc', 'A'); 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Normal', 2525, 'Matriotism Plc', 'Carfax & Co', 'A'); 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Normal', 693, 'Matriotism Plc', 'Sylph Fabrication', 'A'); 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Fragile', 2976, 'Nosophobia Fabrication', 'Carfax & Co', 'B'); 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Fragile', 3385, 'Nosophobia Fabrication', 'Carfax & Co','B'); 

回答

7

與符號字符(&)告訴您要使用替代變量甲骨文的一些例子。

你要麼逃避這些在插入前加上所有&符號與轉義字符:

SET ESCAPE '\' 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Fragile', 3385, 'Nosophobia Fabrication', 'Carfax \& Co','B'); 

或禁用掃描完全替代變量:

SET SCAN OFF 

INSERT INTO description 
(description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
('Fragile', 3385, 'Nosophobia Fabrication', 'Carfax & Co','B'); 

欲瞭解更多信息,可隨時檢出: http://ss64.com/ora/syntax-escape.html

3

「&」字符被解釋爲開頭的替代變量。您可以運行你的語句之前完全關閉替代通過執行

set define off; 

或只是立即結束串像

INSERT INTO description 
    (description, item_weight, pickup_customer, delivery customer, category) 
VALUES 
    ('Normal', 2525, 'Matriotism Plc', 'Carfax &'||' Co', 'A'); 
的符號後