Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Developer help enter a substitution variable

I'm trying to enter around 15,000 lines of data into my table using a script, but when I run the script I get a popup window asking me to enter a substitution variable.

How do I stop that from popping up so that it allows me to enter the date?

Here are some examples of some lines of data that I need to enter

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');
like image 898
Michael Avatar asked Nov 10 '12 22:11

Michael


1 Answers

The ampersand character (&) tells oracle that you want to use a substitution variable.

You either escape these in your inserts by prepending all ampersands with the escape character:

SET ESCAPE '\'

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

or disable for scanning for substitution variables entirely:

SET SCAN OFF

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

For more information, feel free to check out: http://ss64.com/ora/syntax-escape.html

like image 74
Lynn Crumbling Avatar answered Oct 20 '22 18:10

Lynn Crumbling