Help - Search - Members - Calendar
Full Version: Varying return types
Oracle DBA Forums > Oracle > Oracle Forum
gpollokoff
I have two Oracle instances, both are 10.2.0.3

Executing the following results in two different results:

select N'Test" "result" from dual;

On one the output is:
resu
----
Test


and on the other the output is

result
----------------
Test


This seems to suggest that one is returning "Test" as a char(16) and the other as a varchar2 or nvarchar2. In both cases, NLS_CHARACTERSET is WE8ISO8859P1 and NLS_NCHAR_CHARACTERSET is AL16UTF16.

Not being an Oracle DBA, I am not sure where to look. Any suggestions (or answers!) would be greatly appreciated.
SteveC
That is not what you entered in SQL*PLus:


These work:
select N'Test' "result" from dual;

select N'Test' result from dual;

This (what you posted) does not:
SQL> select N'Test" "result" from dual;
ERROR:
ORA-01756: quoted string not properly terminated

CODE
SQL> col result for a4
SQL> select N'Test' result from dual;

RESU
----
Test

SQL> col result for a12
SQL> select N'Test' result from dual;

RESULT
------------
Test
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.