The below is a snippet that updates a customers name using SQL*Plus. It works ok for all customers except for customers whose name contains a '&' symbol even though the name is 'enclosed'.
sqlplus -s $user/$pass@$db << EOF
UPDATE order_address SET name = '$customer_name' WHERE address_type = '2' AND order_number = '$order_number';
COMMIT;
EXIT;
EOF
What should be done so that it works even on customers whose name contains a '&'?
Update: It seems it does actually work but wherever there is a '&' it puts 'COMMIT;' so the name shows as 'A COMMIT; B' instead of 'A & B'.