This is a discussion on Strange View in the database within the Oracle Database forums, part of the Database Server Software category; --> There is this strange view in the database i am working on: "create or replace view inv_dtls as select ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. Regards, Anish |
| |||
| 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 |