Oracle 10g - Chinese Character In New Columns

May 21, 2010

I am using Oracle 10g version and I have a database created and it contains around 9 tables and 25k records, as per my current requirement I need to add few more columns in the existing tables and those new columns are going to be filled with contents from multiple languages (as of now Chinese and English). I went through Oracle 10g globalization guide and I understood that, for my requirements I need to add my new columns with data types of either NVARCHAR or NCHAR.

With my about understanding I created the following table and tried to insert some Chinese characters as follows but it's now coming as expected and I'm getting inserted only "????" in my table columns

Find below the list of actions

>create table Employee(EmpId varchar(255), EmpName NCHAR(255));
>insert into Employee(EmpId, EmpName) values('280129','彭俊睦');
>select * from Employee;
280129 ¿¿¿

>insert into Employee(EmpId, EmpName) values('28018',N'彭俊睦');
>select * from Employee;
280129 ¿¿¿
28018 ¿¿¿

When I run the “select * from v$nls_parameters;” query I’m getting the following data

NLS_LANGUAGE ---------à SIMPLIFIED CHINESE
NLS_TERRITORY---------à AMERICA
NLS_CURRENCY---------à $
NLS_ISO_CURRENCY---------à AMERICA
NLS_NUMERIC_CHARACTERS---------à .,
NLS_CALENDAR---------à GREGORIAN
NLS_DATE_FORMAT---------à DD-MON-RR
[Code] .....

View 3 Replies


ADVERTISEMENT

SQL & PL/SQL :: Insert Some Chinese Character In Oracle Table?

May 9, 2011

I want to insert some Chinese character in a row of my master table and also retrieve the same to display on web page along with others.

View 2 Replies View Related

Globalization :: Convert Chinese Character From US7ASCII To AL32UTF8?

Sep 17, 2012

Source Database: AMERICAN_AMERICA.US7ASCII
Target Database: AMERICAN_AMERICA.AL32UTF8

From the source database, the chinese characters are stored in some schema table. From the csscan result, there are convertiable, truncate, data lossy character. So, I have tried to use exp/imp for the conversion. However, all chinese characters are invalided and cannot be read anymore. How can I convert them from US7ASCCI to UTF8 database?

Also, I have tried build up another database with AMERICAN_AMERICA.ZHT16MSWIN950. The exp/imp is used for conversion again. The chinese characters are readable in AL32UTF8 database.

- source database (US7ASCII)
export NLS_LANG=AMERICAN_AMERICA.US7ASCII
export LANG=AMERICAN_AMERICA.US7ASCII
exp userid='/ as sysdba' file=export.dmp full=y

- target database (AL32UTF8)
export NLS_LANG=AMERICAN_AMERICA.US7ASCII
export LANG=AMERICAN_AMERICA.US7ASCII
imp userid='/ as sysdba' file=export.dmp full=y ignore=y

Result:
from US7ASCII to AL32UTF8:
the chinese characters cannot be read

from US7ASCII to ZHT16MSWIN950:
the chinese characters cannot be read

from ZHT16MSWIN950 to AL32UTF8:
the chinese characters can be read

How can I convert the chinese character from US7ASCCI to UTF8 database?

View 6 Replies View Related

Globalization :: Forms / Reports Chinese Character Support?

Jul 4, 2013

We have an existing db (10.2.0.4.0) and forms (11.1.2.1.0) application, that we're trying to extend to support Chinese characters. We're looking to add some unicode (nvarchar2) columns to existing tables, rather than converting the whole db charset. I've pasted my environment settings below. What I've found so far in trying to create a local (ie. running the form in Builder with local weblogic running) test form, is that I can insert the chars ok (using plsql developer) and the test form can display them correctly, but cannot write them back to the database. They appear as upside down question marks in any records the form has created. 

Env variables:NLS_LANG = .UTF8 Database:NLS_CHARACTERSET = WE8MSWIN1252NLS_NCHAR_CHARACTERSET = AL16UTF16 1)

So, how to get the form to write the characters back into the database correctly? 2) The chinese chars will only be relevant to a few forms inside the app, are there any settings local to the form that will enable unicode support, rather than setting at OS level. ie, an alter session, or equivalent? 3) Oracle Reprts doesn't appear to have an nchar datatype unlike Forms, is there anyway to get Reports (generating PDFs), to include Chinese?

I now have the chars writing back to the db ok. If you do it via an INSERT statement from inside the form, it doesn't work. It appears the value is sent to the db in the normal charset rather than the national charset, and it's written as a question mark. If you pass the value from the form into a back end stored proc though (which does the insert) it works okay.

View 3 Replies View Related

SQL & PL/SQL :: Creating Oracle Database To Support Chinese Fonts

Aug 21, 2012

mentioned database is created with Character set = UTF8 and the National Character Set = AL16UTF16 and got the result for other languages (latin,german,french etc) but still Chinese language was not supported.

NLS_CHARACTERSETAL32UTF8
NLS_NCHAR_CHARACTERSETAL16UTF16

I was getting the output as given below-

SQL> select translator ('table and chair','zh-CN','en') English_to_chinese from dual ;

ENGLISH_TO_chinese
--------------------------------------------------------------------------------
┐┐┐┐┐

and the function is given below

/* Formatted on 16/08/2012 21:55:39 (QP5 v5.215.12089.38647) */
CREATE OR REPLACE FUNCTION translator (p_words IN CLOB, -- words to be translated
p_to IN VARCHAR2, -- language to translate to

[Code].....

View 15 Replies View Related

Server Administration :: Unable To See / Insert Chinese Characters In Oracle Database

Jun 14, 2013

We are getting problem with the Chinese character set. My current character set is as follows.

PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
[code]....

My column description for the table product is as follows.

PART_NBRVARCHAR2 (30 Byte)
PART_DESCNVARCHAR2 (2000)

when trying to insert Chinese character using the insert command below

insert into product(part_nbr,part_desc,cust_name) values('322341',unistr('功'),'test');

I am getting the value when selecting the same record using the select command

select a.part_nbr,a.part_desc,a.cust_name from product a where a.part_nbr='322341'322341¿test

When I running this command on TOAD

select a.rowid,a.part_nbr,a.part_desc,a.cust_name from product a where a.part_nbr='322341'

and manually editing/inserting '功' character in output from select command above. After that I am able to get the same Chinese character when I am running select next time.

View 7 Replies View Related

Server Administration :: Change Space Allocation For Character Columns In Database

Oct 24, 2012

I want to change space allocation for character columns in my database, So it will store them as 'CHAR' and not 'BYTE'.my character set is

SQL> SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER='NLS_CHARACTERSET';
VALUE
----------------------------------------------------------------
AL32UTF8
SQL> alter system set NLS_LENGTH_SEMANTICS='CHAR' scope=both;

System altered.I bounced the instance just to make sure

System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Connected to an idle instance.

SQL>
SQL>
SQL> startup
ORACLE instance started.
[code].....

And then I want to see that when I create a table with some varchar2 column,The space for it will be allocated by chars, and not by bytes! However, when I run a check of create table, this is what I get:

SQL> drop table check_char;

Table dropped.

SQL> create table check_char (some_name varchar2(10));

Table created.

SQL> select a.char_used
2 from all_tab_columns a
3 where table_name='CHECK_CHAR'
4 and a.owner='SYS';

C
-
B
SQL>

What is the reason for space allocation to remain in BYTES and not CHAR, or what else I can check?

View 4 Replies View Related

Server Administration :: How To Know Character Set As Single Character Or Multi Character

Sep 26, 2013

how do we know database character set is either single character set or multi character set?

While changing character-set from AL32UTF8 to WE8MSWIN1252 got "ORA-12712: new character set must be a superset of old character set".

Below are steps taken to resolve the issue -

ALTER DATABASE CHARACTER SET WE8MSWIN1252;

i got this error: ORA-12712: new character set must be a superset of old character set

below are the commands executed by me:

SQL> SHUTDOWN IMMEDIATE;
SQL> CONNECT SYS/password AS SYSDBA;
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE WE8MSWIN1252;
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT;

And its working...

I have not done it in proper order. Neither have done ccsscan. Still, no user reported any issues. Do my changes truncated the data?

View 11 Replies View Related

SQL & PL/SQL :: Chinese Zodiac Associated With Birth Years

Aug 8, 2010

I have a question to write a pl/sql for Chinese zodiac but i cant do it, even i Google it i cant find any solution..the question is as below:

The Chinese zodiac associates birth years with the following; animals:

Birth Year Animal
1924,1936.1948,1960,1972,1984,1996 Rat
1925,1937,1949,1961,1973,1985,1997 Cow
1926,1938,1950,1962,1974,1986,1998 Tiger
1927,1939,1951,1963,1975,1987,1999 Rabbit
1928,1940,1952.1964,1976,1988,2000 Dragon
1929,1941,1953,1965,1977,1989,2001 Snake
1930,1942,1954,1966.1978,1990,2002 Horse
1931,1943,1955.1967,1979,1991,2003 Sheep
1932,1944,1956,1968,1980,1992,2004 Monkey
1933,1945,1957,1969,1981,1993,2005 Chicken
1934.1946,1958,1970,1982,1994,2006 Dog
1935,1947,1959,1971,1983,1995,2007 Pig

Write a command to declare a date variable named birth_date, and assign to it your birth date. Use an IF/ELS1F structure to test every year and determine the animal associated with your birth year. Then display your birth year and the associated animal name. For example, the program would display the following output for someone born in 1984:

I was born in 1984, which is the year of the Rat. Declare and use additional variables as needed.

View 18 Replies View Related

SQL & PL/SQL :: Display Data In Chinese Language In Windows 7

May 21, 2013

I want to display data in Chinese language.I have a emp table in my scott user.

View 7 Replies View Related

Client Tools :: Toad Converts Chinese

Oct 26, 2012

I have some data in an Excel Sheet which is in Simplified Chinese, which I have to enter in oracle database. As soon as I paste the data into the insert statement on TOAD it gets converted into question marks.

Toad Version : 9.5.0.31
Oracle DBMS: 10.2.0.4.0
NLS_CHARACTERSET= UTF8

Chinese language is also installed on the instance with base language as US.

View 1 Replies View Related

Client Tools :: How To Display Chinese Characters In Sql Developer

Apr 22, 2013

I have a table named invoice_info(INV_NUMBER number,BILL_TO_NAME char(55),SHIP_TO_NAME char(55)) which is having chines characters in the BILL_TO_NAME & SHIP_TO_NAME fields.

If i am displaying this tables data on my sql developer it's showing data like some junk chars like ?????????¨¬???? for the fields BILL_TO_NAME & SHIP_TO_NAME .

How can i display them as chines chars on sql developer.

View 3 Replies View Related

SQL & PL/SQL :: Access Column Having Japanese Data Along With English And Chinese?

Sep 19, 2011

I have a table having data in different languages like English, Japanese and Chinese. I need to retrieve only those rows which are in Japanese. What all settings do I need to make. When am doing a normal select, rows in languages other than English are appearing as Junk data.

View 8 Replies View Related

SQL & PL/SQL :: Function In Oracle To Select Not-null Columns At Beginning And Null Columns At End?

Jul 12, 2012

I have 8 columns. Some of them might be null.I want to display all 8 columns in my result. Not null columns will be first and null at the end.Here is a sample data :

Employee table :
Employee_id Emp_fname emp_lname emp_mname dept salary emp_height emp_weight
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223

The expected result is :
result1 result2 result3 result4 result5 result6 result7 result8
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223

View 8 Replies View Related

SQL & PL/SQL :: How To Insert Special Character / ORA-00911 / Invalid Character

May 25, 2010

We have Oracle 10g and user trying to Insert following in one of our table field and getting error:

'REVOLUCIÃ"N Historical Corruptions Agenda'

Getting follwoing error:

ORA-00911: invalid character
create table Employee
(Emp_ID Varchar2 (10),
Company_Name Varchar2 (40)
)
Insert into Employee
values ('Emp1', 'REVOLUCIÃ"N Historical Corruptions Agenda');

View 5 Replies View Related

Inserting Character From Extended ASCII Character Set?

Mar 8, 2007

I'm trying to insert a character from the extended ascii character set. Specifically, there's a company that has an accented e (�) in the name. Right now, the company name doesn't have the e at all, accent or no accent. So I'm trying to do an update, something like

update table1 set company_name='blah�" where company='blah'

It runs, but doesn't do the update. Even when I try to forcefully do an insert (instead of an update) I get nowhere; the accented is simply dropped. So the basic question is, how do you insert extended ascii characters into oracle?

View 3 Replies View Related

PL/SQL :: How To Select String Between Nth Specific Character To Nth+1 Character

Aug 9, 2012

I have one string 'SWAP_20120224_MEGAMART_MAR_Sales.csv'

I want to get the string between second underscore and third underscore i.e. 'MEGAMART'

How to achieve this in sql statement?

View 4 Replies View Related

Globalization :: Character Encoding - LATIN-1 Character In UTF-8 DB?

Feb 9, 2013

I am using C++ OCI LIB, to insert some report data from remote OCI client to oracle 11 server. This data is read by another process to create the report.The DB CHARSET is UTF-8. But the report tool expects the data to be ISO08859-1 encoded. So while inserting the data into the database i specify the following LANG and CHARSET for my table colulmn in client:

The TARGET DB CHARSET is UTF-8
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
size_t csid = 871; // UTF-8
OCIAtrSet((void *) bnd1p, (ub4) OCI_HTYPE_BIND,
*(void *)&csid*,
(ub4) 0,
(ub4)OCI_ATTR_CHARSET_ID, errhp);

This solution works for almost every case of ASCII and Extended ASCII Charest but we are facing issues if we have few specific characters to be inserted.f we are trying to insert single beta character [β] through client, the data goes empty to the column.

Beta Character details:
DEC     OCT     HEX     BIN     Symbol           Description
223     337     DF     11011111     ß     Latin small letter sharp s - ess-zed

DB Output after insert single β:
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------

But if the string is *"ββ"* everything work fine:
DB Output for "ββ":
select rawtohex(NAME) from PERSONS where EID=333;

RAWTOHEX(NAME)
---------------------------
DFDF

View 6 Replies View Related

SQL & PL/SQL :: Oracle 9i DB - Developer Suite And Character Set

Feb 20, 2012

I am running an Oracle 9i DB with character set : FRENCH_FRANCE.WE8ISO8859P1.

The data inside the DB deals with two languages :
- French and Arabic.

I insert, delete, update data on the DB through one of these tools :
- SQL*PLUS
- Forms 6i

and everything works fine especially with Arabic : characters are interpreted correctly by these tools. Now, I want to use Dev Suite as a new tool.

My problem is with Arabic characters : they are not displayed correctly. On the web form (run by a JRE : JInitiator) the characters are not replaced by "?", they are wrongly interpreted.

Example :

The right interpretation of "Amine" in arabic is : أمين and not : Ããíä.
So, querying a table with Dev Suite returns me Ããíä and not ????.

It seems like the JRE "understands" the characters but doesn't know how to "interpret" the Arabic characters correctly. I've tried to play with the NLS_LANG parameter on the regedit but in vain.

View 6 Replies View Related

SQL & PL/SQL :: Different Special Character Display Oracle 10 Versus 11g?

Sep 17, 2012

A database containing inventory data has been migrated from Oracle 10g to Oracle 11g. I have access to both the Oracle 10g and Oracle 11g database on different client computers. Both databases use the same character set, WE9MSWIN1252 (query shown below). However the results from the sql SELECT show incorrectly displayed characters. I would like the "1/2" character and degree character to show in the text. The ASCIISTR function shows that the underlying ascii is the same in the two copies of the databases.

Is there a setting that needs to be changed in Oracle 11g so that the saved special characters in the database show correctly (as in Oracle 10).

Query of database character set

SQL> Select value from SYS.NLS_DATABASE_PARAMETERS where PARAMETER = 'NLS_CHARACTERSET'
WE8MSWIN1252

Under Oracle 11g, this is a query on DSI using SQLPLUS 11.2.0.1.0.

SQL> select description from part where id = '57234';

DESCRIPTION
----------------------------------------
KL BRKT PLN 22╜░ ANGLE (AMER BOT RAIL)
SQL> select asciistr(description) from part where id='57234';
ASCIISTR(DESCRIPTION)
--------------------------------------------------------------------------------

[code].....

View 6 Replies View Related

PL/SQL :: How To Select Substring In Oracle Up To More Than One Specific Character

Nov 12, 2013

How to select a substring in oracle up to a more than one specific characterfor ex : 121.051^NP: FAMILY PRACTICE  ( trim the values before ^ )            121.051^*NP: FAMILY PRACTICE (trim the value before *). with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.   

SUBSTR(p.phys_sub_grp_2_desc,INSTR(p.phys_sub_grp_2_desc, '^') +1)

View 7 Replies View Related

Reports & Discoverer :: Character Report In Oracle 10g Like 6i?

Apr 15, 2011

Can I make charatcer report in 10g web application like 6i

View 1 Replies View Related

SQL & PL/SQL :: Handling Special Character (&) In Oracle Stored Procedure?

Apr 23, 2013

How to handle special charater '&' in stored procedure.

Following is a test code I want to Implement

CREATE OR REPLACE PROCEDURE SP_Test(QueryID NUMBER,DateFirst DATE,DateLast DATE) IS
BEGIN
INSERT
INTO TempTable(QueryID,LineID,data,Datetime)
SELECT
1,6,Emp,startdate FROM salary

[code]....

The code above resuts into INVALID state of stored procedure and cannot be executed.

View 8 Replies View Related

Server Administration :: Change Character Set For Oracle 8i Databases?

Aug 15, 2013

How to change Character set for oracle 8i database. Is there anyway to change the Character set without affecting the current database.

View 11 Replies View Related

Globalization :: Non-English Character In Oracle 10g Express Edition

Oct 5, 2012

I have a table. It's name is INSTITUTION. It has a NUMBER INS_ID and NVARCHAR2(50) INS_NAME . INS_NAME can contain Turkish characters, such as "ğ,ü,ş,ç,ö". According to business logic, there can not be a repetition on the INS_NAME.User will enter institution name from a textbox in ASP.NET , and I check this name in database from c sharp code, if there is no repetition, we will add this record.

The problem is; when user enter a instition name that contains Turkish character, there is a duplication. If there is a instition name is *"su işleri"* , the both query; SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; and SELECT * FROM INSTITUTION WHERE INS_NAME = *'su isleri'*; returns no result, even though there it is.But if instition name is "oracle corporation" (there is no Turkish character) it query successfully. I have the same problem in Toad for Oracle 11.5.1.2. When I query database from toad SELECT * FROM INSTITUTION, the phrase *"su işleri"* has appeared. But when I query SELECT * FROM INSTITUTION WHERE INS_NAME = *'su işleri'*; , there is again no result.When I connect oracle database directly and perform the query SELECT * FROM INSTITUTION , the phrase *"su isleri"* (not *"su işleri"* ) has appeared.

Here are the language settings of the database:

National Language Support
National Language Parameter Value
NLS_CALENDAR______________GREGORIAN
NLS_CHARACTERSET__________WE8MSWIN1252
NLS_COMP__________________BINARY
NLS_CURRENCY______________TL
NLS_DATE_FORMAT__________DD/MM/RRRR
NLS_DATE_LANGUAGE________TURKISH
NLS_DUAL_CURRENCY_________YTL
[code]....

View 8 Replies View Related

Globalization :: Junk Character Insertion In Oracle Table

Feb 6, 2013

How to avoid Junk character insertion in oracle table. I have prepared scripts like this Say

customer - info

After insertion the data is inserted like below in production

Customer ¿ info

We are using command prompt for script execution in production environment. I am using PLSQL developer and SQL developer for development. i cannot see junk data in PLSQL developer and latest SQL developer , but its caught in old version of SQL developer. Also in Application also i can able to figure out junk data.

View 6 Replies View Related

SQL & PL/SQL :: Oracle Database 10g - Data In Column Stored In Different Character Set

Sep 23, 2010

Oracle database version is : 10G.

When we try to query a column from a table the output is shown as "?????". Seems the data in that column is stored in a different character set, which is not recognised while displaying the output. The column size is 35byte.

The nls parameter table shows the character set as "we8mswin1252".

get this issue resolved.

View 7 Replies View Related

SQL & PL/SQL :: Handling Trademark Special Character During Data Loading In Oracle 11g

Aug 6, 2012

we have a Oracle 11g database, but it does not support UTF8 character set. Now we have received a file which contains records with Trade Mark symbol (special character). Now when we are trying to load the record, it is getting loaded with a sign "?". As a result when we try to display record in web application, the application is not able to show the records properly.

View 5 Replies View Related

SQL & PL/SQL :: Pseudo Columns In Oracle

Oct 14, 2010

ROWNUM, ROWID, LEVEL, NEXTVAL, CURRVAL, USER, UID are pseudo columns in oracle. But I read in this site that SYSDATE and SYSTIMESTAMP are also pseudo columns. Is this right? how they are pseudo columns?

View 15 Replies View Related

Reports & Discoverer :: Create A Report By Using One Field / Text As Columns Name In Layout But Display All Columns

Jun 16, 2010

I want to create a report by using one field and one text as columns name in layout but display the all the columns. I mention the 5 column names in query.how can I write function in summary column.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved