Datatypes in the views

November 30 0
Advertisement
Why do the views don’t have size in the number types??? For example I have ID_Customer Number instead of Number(9). Whereas the Varchar2 fields have the size. For example: Customer_name Varchar2(25)
I have a calculate field in a View. I need this field: Number(9,2)
How Can I do it??
Advertisement
<<Why do you need this?>>
Because I have to insert this view records in a table >> that have a field with DataType Number(9,2)... but earlier in the thread you said
Then, I have a calculate field in a View, I need this field: Number(9,2)You can insert a value into a calculated field.
SQL> desc bt1
Name                                      Null?    Type
COL1                                               NUMBER(9,2)
COL2                                               VARCHAR2(30)
SQL> CREATE OR REPLACE VIEW vbt AS SELECT col1, col2, col1*2 AS col3 FROM bt1;
View created.
SQL> desc vbt
Name                                      Null?    Type
COL1                                               NUMBER(9,2)
COL2                                               VARCHAR2(30)
COL3                                               NUMBER
SQL> INSERT INTO vbt VALUES (1, 'APC', 2);
INSERT INTO vbt VALUES (1, 'APC', 2)
ERROR at line 1:
ORA-01733: virtual column not allowed here
SQL> INSERT INTO vbt VALUES (1, 'APC');
INSERT INTO vbt VALUES (1, 'APC')
ERROR at line 1:
ORA-00947: not enough values
SQL> Maybe you need to be clearer about what it is you are trying to do with this view. Or perhaps you just need an INSTEAD OF INSERT trigger.
Cheers, APC
Datatypes in the views

Why do the views don’t have size in the number types??? For example I have ID_Customer Number instead of Number(9). Whereas the Varchar2 fields have the size. For example: Customer_name Varchar2(25) I have a calculate field in a View. I need this fie

Datatypes lost in view

Hello, creating three views, all accessing the same tables, i got the following effect: The table on which all views are based, has Fields with the Datatype Number (10,2). The both first views shows those columns with the correct Datatype. The last o

In user_tab_cols the data_type is 'undefined' for view columns

Can anyone please confirm if this is the correct behaviour ? select table_name, column_name, data_type from user_tab_cols where table_name = 'AR_RCT_CUST_H_V' AR_RCT_CUST_H_V     RCT_CUST_ACCOUNT_NUMBER     UNDEFINED      AR_RCT_CUST_H_V     RCT_CUST

1-to-1 Relationship Between UI and subVI Data Cluster

Discussion continued from here. In summary: JackDunaway wrote: Yes, I can see clear benefits in implementing this Idea - that is, if your underlying datatype elements have a 1:1 relationship with the UI elements. I will illustrate this point by showi

Iexpenses search page - Expense report number li

The standard Iexpenses search page has the following layout in the PG xml file for expense report number. Its a message styled text item - ReportNumberEnabled, which has no fireaction/firepartialaction against it, and a destination property is provid

Format ShowValue to Date

Hi, I'm working on a few changes on our installation of the OracleAS Discussion Forum Portlet. The 1st thing is to format the dates messages are posted. I have tried changing the form to format the date before it is written to the database, but it se

Format datetime to date

Hi All, I have a dimension with some datetime columns in it.Some are datetime and some are datetime2(7). The users will browse the cube from excel. They just want to see the date and not the time. Ex: I have a column named WrittenDate in ClaimDimensi

Reg: View column datatype

Hi Team, While creating the views, column automatically converted into varchar2(81) data type from number datatype. but stage1 table has legacy_trx_number is number data type and statg2 table has header_num is number data type. Just i added the highl

Cannot view BLOB datatypes in Oracle10g

After a successful upgrade from Oracle8i to Oracle10g, I cannot view tables with BLOB datatypes. I'm getting the following error in SQL*PLUS upon quering the table: SP2-0678: Column or attribute type can not be displayed by SQL*Plus When i try to do

View created with NUMBER(126) type instead of using the underlying datatype

I have a view that needs to be updated with one additional field. The view combines the contents of three different tables with the same fields using UNIONs and some logic to filter out certain contents from each table. I created the new field in eac

How to view contents in Long Raw datatype column

Hi, We have two node RAC database with 10.2.0.4.0 version. OS - IBM AIX. We have a table with a column with datatype "LONG RAW" in production. It stores image files. We need to send the images from few rows to third party vendor. Basically, they

View is Created with the Wrong Datatype

Hello All, One of the rows I select while creating a view is a number. Oracle Creates the view with the selected field as a varchar. Why would oracle change a datatype of a selected column in the expressed view? Here is the code: CREATE OR REPLACE VI

SQL Developer Data Modeler Viewer - domain datatypes

I'm using the SQL Developer Data Modeler Viewer (that comes free with SQL Developer) to view a model that was created in Oracle SQL Developer Data Modeler (the chargeable product). The colums have all been defined using domain datatypes. I have an XM

Inconsistent datatypes: expected - got CHAR, Detail view bind variables

Hi. Here is my problem: I have master detail views connected with a view link. Both of views have bind variables that hold some session info: It's a menu on database and I am trying to hide some values based on user permissions. When running applicat

Re: Reg: View column datatype

Hi All, After changing it, I was getting the output like for legacy_trx_number. 220135.1 220135.2 220135.3 220135.4 220135.5 220135.6 220135.7 220135.8 220135.9 220135.1 -- It should be 220135.10 after converting into to_number(h1.legacy_trx_number||

Illegal use of LONG datatype error message when i create materialized view

Hello to all I want create read only materialized view replication environment two of our tables have LONG datatype when i create materialized view against on them I recieve this error message CREATE MATERIALIZED VIEW MDB.TOAD_PLAN_TABLE TABLESPACE a

ORA-00932 (Inconsistent datatype) on BLOB field in a view using Forms 6i

Hi I created a table having a BLOB column and populate it with images and also make queries on that table using form 6i but when I use a view to build a form which built on that table when I try to query I receive the following error : ORA-00932:Inco

Mismatch in the datatypes in join conditions of the views

Hi guys, For creating a view I am trying to join 2 tables( EUIINSTLN & EUFASS). I have selected 4 fields in first table(EUIINSTLN) and 3 fields in the second table(EUFASS). The join condition is in such a way that the first table field(EUIINSTLN-ANLA

Need help with "ORA-00902: invalid datatype"  while creating a view

I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options..... when I try ti create a view, I am getting ORA-00902 error. SQL> create view sales_view as 2 select * 3 from tab

Unexpected datatype in View

Please look at this example: SQL> CREATE TABLE t1 (s1 VARCHAR2(10), s2 FLOAT); Tabelle wurde erstellt. SQL> SQL> CREATE TABLE t2 (s1 VARCHAR2(10)); Tabelle wurde erstellt. SQL> SQL> CREATE VIEW v1 AS 2 SELECT t1.s1, t1.s2 3 FROM t1 4 UNION