Reputation: 97
I need to update value in one table, which is having special character. Below is the Update Query I have Executed:
UPDATE TABLE_X
SET DISPLAY_NAME = 'AC¦', NATIVE_IDENTITY='AC¦'
WHERE ID='idNumber'
Special Character "¦" is not getting updated in Oracle.
I have already tried below approaches:
select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
It is having "US7ASCII" Character set.
SELECT CONVERT('¦ ', 'ASCII') FROM DUAL;
I have tried below different encoding:
Before Changing the character set in DB i wanted to try out 'CONVERT' function from Oracle, but above mentioned character set is either returning "Block Symbol" or "QuestionMark � " Symbol.
Any idea how can I incorporate this special symbol in DB?
Upvotes: 1
Views: 1277
Reputation: 231651
Assuming that the character in question is not part of the US7ASCII character set, which it does not appear to be unless you want to replace it with the ASCII vertical bar character |, you can't validly store the character in a VARCHAR2
column in the database.
NVARCHAR2
assuming your national character set is UTF-16 which it would normally be.RAW
column and convert back from the binary representation in your application logic.I would prefer changing the database character set but that is potentially a significant change.
Upvotes: 1