Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Strange View in the database

Re: Strange View in the database

From: Billy <vslabs_at_onwe.co.za>
Date: 2 Aug 2005 04:36:19 -0700
Message-ID: <1122982579.721200.254910@g47g2000cwa.googlegroups.com>


anish wrote:
> There is this strange view in the database i am working on:
> "create or replace view inv_dtls as
> select to_char(null) supplier_name,to_date(null) invoice_date,
> to_number(null) invoice_number from dual where 1=2"
> Can any body please tell why exactly such views are needed .Front end
> of the application is designed using forms 6i.

It could serve as a template of sorts.. but the resulting template is

- SUPPLIER_NAME varchar2 -undefined length-
- INVOICE_DATE  date  -zero length-
- INVOICE_NU<BER number -zero length-

And this template cannot be used for much anything SQL-wise. The zero lenghts prohibts it from being used for create a table. Zero lengths also does not make it very usable for PL/SQL record types.

Could be a left-over of some developer's experimentation with a template definition for a view.. maybe dealing with disparate data sets via a UNION and using this as the result set template.. (which is not something that works as you cannot govern the sizes of data types using this method).

--
Billy
Received on Tue Aug 02 2005 - 06:36:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US