2012-11-10 16 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

にアンパサンド文字(&)を入力する必要があるデータのいくつかの行のいくつかの例がありますが、置換変数を使用することがOracleに伝えられます。

次のいずれかのエスケープ文字で、すべてのアンパサンドを付加することで、あなたの挿入でこれらをエスケープ:気軽に、より多くの情報については

SET SCAN OFF 

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

SET ESCAPE '\' 

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'); 
などのアンパサンドの直後の文字列を終了することができます
関連する問題