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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple (?) question about views

Re: Simple (?) question about views

From: Dennis Wetherell <dwether_at_mail.arco.com>
Date: Wed, 5 Aug 1998 17:27:11 GMT
Message-ID: <01bdc096$7bef7540$186be288@ato-10111>


You are only printing out the select statement for the view. You are not printing the actual view definition. Most likely the value QTY_VCHR is renamed as QTY_INVOICED in the view definition.

E.g. create view PS_VCHR_LN_PO_VW (...,

                                                              ...,
                                                              QTY_INVOICED,
                                                              ...)
as select (...,
               ...,
               L.QTY_VCHR,
               ...) from PS_VOUCHER_LINE L, PS_VOUCHER V ...

>
> Now, from a completely different source, I have obtained what I strongly
> believe to be the source actually used to create the view, but I won't
> absolutely swear to it:
>
> select /*+ choose */
> L.BUSINESS_UNIT_PO,
> L.PO_ID,
> L.LINE_NBR,
> L.SCHED_NBR,
> L.BUSINESS_UNIT_RECV,
> L.RECEIVER_ID,
> L.RECV_LN_NBR,
> L.RECV_SHIP_SEQ_NBR,
> L.BUSINESS_UNIT,
> L.VOUCHER_ID,
> L.VOUCHER_LINE_NUM,
> L.QTY_VCHR,
> L.MERCHANDISE_AMT
> from
> PS_VOUCHER_LINE L,
> PS_VOUCHER V
> where
> V.BUSINESS_UNIT = L.BUSINESS_UNIT
> and V.VOUCHER_ID = L.VOUCHER_ID
> and V.ENTRY_STATUS <> 'X'
> and L.BUSINESS_UNIT_PO <> ' '
> and L.PO_ID <> ' '
> group by
> L.BUSINESS_UNIT_PO,
> L.PO_ID,
> L.LINE_NBR,
> L.SCHED_NBR,
> L.BUSINESS_UNIT_RECV,
> L.RECEIVER_ID,
> L.RECV_LN_NBR,
> L.RECV_SHIP_SEQ_NBR,
> L.BUSINESS_UNIT,
> L.VOUCHER_ID,
> L.VOUCHER_LINE_NUM,
> L.QTY_VCHR,
> L.MERCHANDISE_AMT
>
>
> Note that the two appear to be semi-identical, and the column in
question,
> QTY_INVOICED, doesn't appear here either.
>
> HOWEVER, if I go into SQL*Plus, and enter "desc ps_vchr_ln_po_vw", it
says:
>
> SQL> desc ps_vchr_ln_po_vw
> Name Null? Type
> ------------------------------- -------- ----
> BUSINESS_UNIT NOT NULL VARCHAR2(5)
> PO_ID NOT NULL VARCHAR2(10)
> LINE_NBR NOT NULL NUMBER(38)
> SCHED_NBR NOT NULL NUMBER(38)
> BUSINESS_UNIT_RECV NOT NULL VARCHAR2(5)
> RECEIVER_ID NOT NULL VARCHAR2(10)
> RECV_LN_NBR NOT NULL NUMBER(38)
> RECV_SHIP_SEQ_NBR NOT NULL NUMBER(38)
> BUSINESS_UNIT_AP NOT NULL VARCHAR2(5)
> VOUCHER_ID NOT NULL VARCHAR2(8)
> VOUCHER_LINE_NUM NOT NULL NUMBER(38)
> QTY_INVOICED NOT NULL NUMBER(15,4)
> AMT_INVOICED NOT NULL NUMBER(15,2)
>
> And QTY_INVOICED is there, just as plain as day.
>
> Now, I thought I understood Oracle fairly well, but I'm stumped. Please
help
> me see the error of my ways.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
Received on Wed Aug 05 1998 - 12:27:11 CDT

Original text of this message

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