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: Problem in Database Migration for Views

Re: Problem in Database Migration for Views

From: TheanKeong <theankeong_at_gmail.com>
Date: 1 Mar 2005 00:54:51 -0800
Message-ID: <1109667291.797176.132610@f14g2000cwb.googlegroups.com>


Hi Mark,
This is my full SQL Statement.

create or replace view dbo."v_ar_sales_analysis" as select jd_date as Invoice_Date,
jd_comp_id as Company_ID,
(select comp_name from dbo.company where comp_id=jd_comp_id) as
Company_Name,
NVL(jd_debit,0.0) as Debit_Amount,
NVL(jd_credit,0.0) as Credit_Amount,
(Credit_amount - Debit_Amount) as Amount
from dbo.jrn_dtl
 where((jd_source='SJ' and(jd_debit is null or jd_debit=0)) or(jd_source='DC' and(jd_debit is null or jd_debit=0)) or(jd_source='CC' and(jd_credit is null or jd_credit=0))) and jd_comp_id=any(select uc_comp_id from dbo.user_company where uc_au_cd='session_user');

When I execute the statement, it gives me this error ORA-00904: "DEBIT_AMOUNT": invalid identifier

What is the problem ?

Please advice
Kwan Received on Tue Mar 01 2005 - 02:54:51 CST

Original text of this message

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