Home » SQL & PL/SQL » SQL & PL/SQL » How to save cm² ? (Oracle DB)
How to save cm² ? [message #425697] Sun, 11 October 2009 22:35 Go to next message
ap_karthi
Messages: 87
Registered: October 2007
Location: Bangalore
Member
Hi,

create table spl(a varchar2(10));

insert into spl values('cm²'); -- Use ALT+0178 to get ².

select * from spl;

A
----------
cm?

Doubt : How to save cm² and how cm² is changed to cm? . Please explain. Thanks.

-Karthik
Re: How to save cm² ? [message #425698 is a reply to message #425697] Sun, 11 October 2009 22:55 Go to previous messageGo to next message
BlackSwan
Messages: 25032
Registered: January 2009
Location: SoCal
Senior Member
Post SQL & results from command below

select asciistr(*) from spl;
Re: How to save cm² ? [message #425700 is a reply to message #425697] Sun, 11 October 2009 23:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
spool t.lst
select * from spl;
spool off

And watch t.lst with an editor that supports extended character like wordpad, word...

Or
select dump(a) from spl;
and check the ascii code of characters.

Regards
Michel
Re: How to save cm² ? [message #425701 is a reply to message #425700] Sun, 11 October 2009 23:41 Go to previous messageGo to next message
ap_karthi
Messages: 87
Registered: October 2007
Location: Bangalore
Member
Hi Michel,

The output is...
SQL> select dump(a) from spl;

DUMP(A)
--------------------------------------------------------------------------------------------------
Typ=1 Len=3: 99,109,63


How does this will resolve my problem?

-Karthik
Re: How to save cm² ? [message #425703 is a reply to message #425701] Sun, 11 October 2009 23:43 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It does not solve anything, it is the starting point of an investigation.
What are your database and client character sets?

Regards
Michel

[Updated on: Sun, 11 October 2009 23:46]

Report message to a moderator

Re: How to save cm² ? [message #425720 is a reply to message #425697] Mon, 12 October 2009 00:46 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
In my case, it is working well.

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE    11.1.0.6.0      Production
TNS for 64-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production

5 rows selected.

SQL>create table t1
  2  (col1 varchar2(100));

Table created.

SQL>insert into t1 values('cm²');

1 row created.

SQL>select * from t1;

COL1
----------------------------------------------------------------------------------------------------
cm²

1 row selected.


regards,
Delna
Re: How to save cm² ? [message #425749 is a reply to message #425720] Mon, 12 October 2009 01:29 Go to previous messageGo to next message
ayush_anand
Messages: 417
Registered: November 2008
Senior Member
In my case also
SQL> create table t1
  2  (col1 varchar2(100));

Table created.

SQL> insert into t1 values('cm²');

1 row created.

SQL> select * from t1;

COL1
--------------------------------------------------------------------------------
cm²

SQL> 
SQL> select banner from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Re: How to save cm² ? [message #425753 is a reply to message #425703] Mon, 12 October 2009 02:01 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Mon, 12 October 2009 06:43
It does not solve anything, it is the starting point of an investigation.
What are your database and client character sets?

Regards
Michel

And also what are your client and server version (4 decimals)?

Regards
Michel

Re: How to save cm² ? [message #425766 is a reply to message #425753] Mon, 12 October 2009 02:46 Go to previous messageGo to next message
ap_karthi
Messages: 87
Registered: October 2007
Location: Bangalore
Member

SQL*Plus: Release 8.0.6.0.0 - Production on Mon Oct 12 15:45:38 2009

(c) Copyright 1999 Oracle Corporation. All rights reserved.


Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Re: How to save cm² ? [message #425767 is a reply to message #425766] Mon, 12 October 2009 02:49 Go to previous messageGo to next message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What are your database and client character sets?
Regards
Michel
Re: How to save cm² ? [message #428175 is a reply to message #425767] Tue, 27 October 2009 07:16 Go to previous messageGo to next message
ap_karthi
Messages: 87
Registered: October 2007
Location: Bangalore
Member
Thanks all...

Found solution.

Change in Registry under ORACLE as shown below.

NLS_LANG -> AMERICAN_AMERICA.US7ASCII
Re: How to save cm² ? [message #428197 is a reply to message #428175] Tue, 27 October 2009 08:11 Go to previous message
Michel Cadot
Messages: 64098
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So it was your client character set.

Regards
Michel
Previous Topic: From Access2002 to Oracle
Next Topic: HOW TO GIVE GRANT TO A TRIGGER
Goto Forum:
  


Current Time: Fri Dec 02 12:23:12 CST 2016

Total time taken to generate the page: 0.16566 seconds