Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Strange View in the database
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).
-- BillyReceived on Tue Aug 02 2005 - 06:36:19 CDT
![]() |
![]() |