0

I have a table like:

Table
{
...
...
SETTLEMENTDAY                          VARCHAR2(10 CHAR)  
ACCOUNT                                VARCHAR2(50 CHAR)  
AMOUNT                                 NUMBER(38,5)       
CURRENCY                               VARCHAR2(3 CHAR)   
...
...
}

When I am creating View using this table I am getting the following:

 View
    {
    ...
    ...
    SETTLEMENTDAY                          VARCHAR2(40 CHAR)  
    ACCOUNT                                VARCHAR2(200 CHAR)  
    AMOUNT                                 NUMBER(38,5)       
    CURRENCY                               VARCHAR2(12 CHAR)   
    ...
    ...
    }

There is no casting. I am using Oracle 12.2.0.1.0. I tried to use following alter query but not helping

alter session set nls_length_semantics=CHAR;

I am not able to understand why the size is getting multiplied by 4. Which variable in database could have affected that.

Thanks,

coming out of void
  • 1,454
  • 2
  • 12
  • 12
  • How are you creating a view? I tried CVAS (Create View As Select) from the table, and - no change in datatype. – Littlefoot Apr 10 '20 at 12:47
  • I am also using CVAS. This view and tables are part of large scripts so something in scripts is off which is causing this behavior. – coming out of void Apr 10 '20 at 12:50
  • 1
    How are you "getting the following"? Are you using the `DESCRIBE` command? Using `USER_TAB_COLUMNS`? Or something else? "I am getting the following" is not a technical description of your action. Tell us where you get that info for both the table and the view. –  Apr 10 '20 at 12:55
  • 1
    It might depend on the database's default character set. try `select * from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET'` – Mark Stewart Apr 10 '20 at 18:36

0 Answers0