Reputation: 99
I have imported records from Excel sheet to Oracle table. But in the Oracle table column "&" is saved as "amp;". I want it to be saved as "&" only. My column datatype is varchar2.
Upvotes: 0
Views: 371
Reputation: 146349
Do you just want to fix your data? That's easy enough:
SQL> select col1 from t23
2 /
COL1
--------------------------------------------------------------------------------
ship amp; shovell
cat in the hat
SQL> update t23
2 set col1 = replace(col1, 'amp;', chr(38))
3 /
2 rows updated.
SQL> select col1 from t23
2 /
COL1
--------------------------------------------------------------------------------
ship & shovell
cat in the hat
SQL>
If you want to prevent this happening again you will need to provide us with more details. Specifically, what process are you using to import the data? I would guess you're actually using the XML export of the spreadsheet.
Upvotes: 1