- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to insert chinese charaters in Rdb databas...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2010 01:05 PM
тАО10-18-2010 01:05 PM
How to insert chinese charaters in Rdb database via DCL
Is it possible to insert chinese charaters into to an Rdb table via a sql script which is started via DCL.
Example:
sql> show table1;
Information for table TABLE1
Columns for table TABLE1:
Column Name Data Type Domain
----------- --------- ------
UTFCOL CHAR(300)
UTF8 100 Characters, 300 Octets
sql> Insert into table1 values ('цОзхИ╢');
How can I do this?
Or should I use something like this:
sql> insert into table1 values(translate(hex42424 using rdb$utf8);
All examples are welcome.
/Toine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2011 05:36 PM
тАО02-14-2011 05:36 PM
Re: How to insert chinese charaters in Rdb database via DCL
found on the Web specifically dealing with RDB/VMS and written at
DEC's times. Here is its URL
http://www.hpl.hp.com/hpjournal/dtj/vol5num3/vol5num3art7.pdf
The Oracle RDB/VMS Release Notes 7.1.4.1 mentions a problem with
GB18030 or UTF8 character sets which has been corrected. This is
described in the document at
http://download.oracle.com/otn_hosted_doc/rdb/pdf/rdbrn_7141.pdf in
section 2.2.12.
However all these technics uses a 7 bit ASCII terminal. So with all
the information read in mind, I assume one of the correct RDB syntax
is for your example:
SQL> insert into table1 values (_UFT8 X'42424')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2011 07:15 PM
тАО02-14-2011 07:15 PM
Re: How to insert chinese charaters in Rdb database via DCL
To complement my previous answer you ought to be able to define your table column as:
NAME CHARACTER VARYING (
CHARACTER SET IS UTF8,
Provided sql$ handles locales, you might set the locale as one of the Chinese UTF8 VMS locale with the $ define LANG
$ run sql$
SQL> Insert into table1 values ('├ж ┬з├е ┬╢');
Of course and if cutting and pasting information, your terminal must be UTF8 capable. For more information about terminals, read my reply to Boris at http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1465316
Yours sincerely,
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2011 07:52 PM
тАО02-14-2011 07:52 PM
Re: How to insert chinese charaters in Rdb database via DCL
To correct my previous reply and if I refer to the first document, the correct SQL syntax would be using an UTF8 capable terminal:
SQL> Insert into table1 values (_UTF8'
Of course the column must be declared as CHARACTER SET IS UTF8
Deeply sorry for the confusion.
Philippe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2011 11:27 PM
тАО02-14-2011 11:27 PM
Re: How to insert chinese charaters in Rdb database via DCL
sql$ is only sys$language logical sensitive. You may define it in your process logical name table. sql$ starts up correctly with ENGLISH, SWEDISH and HANZI. However you must own the appropriate keyboard to enter Swedish or Chinese characters into sql$.
I checked this below with sys$language set to English:
$ sql$
SQL> create database filename sys$login:test.rdb;
SQL> create table employees ( name char(300) character set utf8);
SQL> insert into employees values('philippe');
%SQL-F-INCCSASS, Incompatible character set assignment between NAME and
SQL> insert into employees value(_UTF8'philippe');
1 row inserted
SQL> insert into employees values (_UTF8 X'42424');
%SQL-F-HEXSTREVE, A hexadecimal string must have an even number of digits
SQL> insert into employees values (_UTF8 X'042424');
1 row inserted
SQL> select * from employees
cont> ;
NAME
philippe
>>
>>
>>
$$
>>
>>
>>
2 rows selected
SQL> quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2011 04:36 PM
тАО02-15-2011 04:36 PM