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');
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With